/*! For license information please see xo-webcomponents.min.js.LICENSE.txt */ var jh=Object.defineProperty,Qh=(t,e,o)=>e in t?jh(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,o=(t,e,o)=>(Qh(t,"symbol"!=typeof e?e+"":e,o),o);!function(t,e){"object"==typeof exports&&typeof module<"u"?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=typeof globalThis<"u"?globalThis:t||self)["xo-webcomponents"]={})}(this,(function(t){var e,i,s,n,r,a,l,c,h,d,u,p,m,x,g,v,b,f,y,E,w,S,C,k,A,P,T;!function(){var t=function(t,e){var o=function(t){for(var e=0,o=t.length;et.length)&&(e=t.length);for(var o=0,i=new Array(e);o=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,l=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){l=!0,r=t},f:function(){try{!a&&null!=i.return&&i.return()}finally{if(l)throw r}}}}var i=!0,s=!1,n="querySelectorAll",r="querySelectorAll",a=self,l=a.document,c=a.Element,h=a.MutationObserver,d=a.Set,u=a.WeakMap,p=function(t){return r in t},m=[].filter,x=function(t){var e=new u,a=function(o,i){var s;if(i)for(var n,r=function(t){return t.matches||t.webkitMatchesSelector||t.msMatchesSelector}(o),a=0,l=g.length;a1&&void 0!==arguments[1])||arguments[1],o=0,i=t.length;o1&&void 0!==arguments[1]?arguments[1]:document,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:MutationObserver,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["*"],l=function e(s,r,a,l,c,h){var d,u=o(s);try{for(u.s();!(d=u.n()).done;){var p=d.value;(h||n in p)&&(c?a.has(p)||(a.add(p),l.delete(p),t(p,c)):l.has(p)||(l.add(p),a.delete(p),t(p,c)),h||e(p[n](r),r,a,l,c,i))}}catch(t){u.e(t)}finally{u.f()}},c=new r((function(t){if(a.length){var e,n=a.join(","),r=new Set,c=new Set,h=o(t);try{for(h.s();!(e=h.n()).done;){var d=e.value,u=d.addedNodes,p=d.removedNodes;l(p,n,r,c,s,s),l(u,n,r,c,i,s)}}catch(t){h.e(t)}finally{h.f()}}})),h=c.observe;return(c.observe=function(t){return h.call(c,t,{subtree:i,childList:i})})(e),c}(a,v,h,g),f=c.prototype.attachShadow;return f&&(c.prototype.attachShadow=function(t){var e=f.call(this,t);return b.observe(e),e}),g.length&&x(v[r](g)),{drop:function(t){for(var o=0,i=t.length;o"false"!==t.getAttribute(e)&&t.hasAttribute(e),$=(t,e,o)=>{o?t.setAttribute(e,""):t.removeAttribute(e)};function L(t,e){var o;if(null==(o=window.xbEditor)||!o.designMode)throw new Error(`${t}\n\n${e?`Example:\n${e}`:""}`);console.warn(`${t}\n\n${e?`Example:\n${e}`:""}`)}function I(t,e,o){o||L(`${t} must have a \`${e}\` attribute.`,`\n<${t} ${e}="...">\n `)}function O(t,e,o){return Math.min(Math.max(t,e),o)}function N(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function D(t){if("array"===N(t))return t.map((t=>D(t)));if("object"===N(t)){const e={};for(const o in t)e[o]=D(t[o]);return e}return t}function q(t,e){for(let o=0;oObject.keys(t);function F(t,e){q(H(t),(o=>{customElements.get(o)||customElements.define(o,t[o],e)}))}function R(t,e){const o=[];for(let i=0;ie.id!==t))}}emit(t,e){this.events[t]&&q(this.events[t],(({listener:t})=>{t(e)}))}}function z(){const t=new V;let e=-1,o=-1,i=-1,s=0,n=-1,r=-1;function a({to:e,from:o,duration:i=1e3,friction:a=1,reverseEasing:l=!1,easing:c,onStart:h,onUpdate:d,onEnd:u}){let p=null;return s=o,null==h||h(s),t.emit("start",s),cancelAnimationFrame(r),r=requestAnimationFrame((function n(h){p||(p=h);const u=h-p,m=Math.min(u/i,1);s=o+(e-o)*m*a,"function"==typeof c&&(s=l?o+(e-o)*(1-c(1-m)):o+(e-o)*c(m)),t.emit("update",s),null==d||d(s),m<1&&(r=requestAnimationFrame(n))})),n=window.setTimeout((()=>{cancelAnimationFrame(r),clearTimeout(n),s=e,null==d||d(s),null==u||u(s),t.emit("update",s),t.emit("end",s)}),i),()=>{clearTimeout(n),cancelAnimationFrame(r)}}return a.onStart=o=>(e=t.on("start",o),()=>t.off(e)),a.onUpdate=e=>(o=t.on("update",e),()=>t.off(o)),a.onEnd=e=>(i=t.on("end",e),()=>t.off(i)),a.off=()=>{t.off(e),t.off(o),t.off(i),cancelAnimationFrame(r),clearTimeout(n)},a.getValue=()=>s,a}function _(t){let e=5381,o=t.length;for(;o;)e=33*e^t.charCodeAt(--o);return e>>>0}function B(t){return t.replace(/\s+/g," ").trim()}function W(t="global"){return(e,...o)=>{let i=B(e.reduce(((t,e,i)=>null==o[i]?t+e:t+e+o[i]),""));const s={};return"scope"===t&&(i=B(i.replace(/(:global\(|)(?:[\.]{1})([a-zA-Z_]+[\w-_\\\[\]\+\=\{\}\?\*\!\(\)]*)(?:[\s\.\,\{\>#\:]{0})/gim,(t=>{if(t.includes(":global(")){const e=t.replace(/:global\(\s*\.|\)$/g,"");return s[e]=e,`.${e}`}const e=t.trim().replace(/^\./g,""),o=`xo-${e}-${_(i)}`;return s[e]=o,`.${o}`})))),{classes:s,cssText:i}}}function U(t,e=300){let o=-1;return function(...i){const s=this;clearTimeout(o),o=window.setTimeout((()=>{t.apply(s,i)}),e)}}function X(t=0){return new Promise((e=>{const o=window.setTimeout((()=>{e((()=>window.clearTimeout(o))),clearTimeout(o)}),t)}))}function Y(t){/comp|inter/.test(document.readyState)?t():"addEventListener"in document?document.addEventListener("DOMContentLoaded",t):document.attachEvent("onreadystatechange",(()=>{"complete"===document.readyState&&t()}))}const G={linear:t=>t,ease:t=>.5*(1-Math.cos(Math.PI*t)),easeInQuad:t=>t*t,easeOutQuad:t=>t*(2-t),easeInOutQuad:t=>t<.5?2*t*t:(4-2*t)*t-1,easeInCubic:t=>t*t*t,easeOutCubic:t=>--t*t*t+1,easeInOutCubic:t=>t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1,easeInQuart:t=>t*t*t*t,easeOutQuart:t=>1- --t*t*t*t,easeInOutQuart:t=>t<.5?8*t*t*t*t:1-8*--t*t*t*t,easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>1+--t*t*t*t*t,easeInOutQuint:t=>t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t,easeOutBounce:t=>t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,easeInBounce:t=>1-G.easeOutBounce(1-t),easeOutBack:t=>1+2.70158*(t-1)**3+1.70158*(t-1)**2,easeInBack:t=>2.70158*t*t*t-1.70158*t*t,easeInOut:t=>t<.5?G.easeInBack(2*t)/2:G.easeOutBack(2*t-1)/2+.5,easeInElastic:t=>{const e=2*Math.PI/3;return 0===t?0:1===t?1:-(2**(10*t-10))*Math.sin((10*t-10.75)*e)},easeOutElastic:t=>{const e=2*Math.PI/3;return 0===t?0:1===t?1:2**(-10*t)*Math.sin((10*t-.75)*e)+1},easeInExpo:t=>0===t?0:2**(10*t-10),easeOutExpo:t=>1===t?1:1-2**(-10*t),spring:t=>1-Math.cos(4.5*t*Math.PI)*Math.exp(6*-t),decay:t=>1-Math.exp(6*-t)};function j(t,e){if(N.primitive(t)||N.primitive(t)||null==t||null==e)return t===e;const o=Object.keys(t),i=Object.keys(e);if(o.length!==i.length)return!1;for(const i of o){const o=t[i],s=e[i];if("object"==typeof o&&"object"==typeof s){if(!j(o,s))return!1}else if(o!==s)return!1}return!0}function Q(t,e){for(let o=0;o{if(this.lastTimestamp){const e=t-this.lastTimestamp;q(this.keepAliveFrames,(o=>o.call(this,{delta:e,timestamp:t})))}this.lastTimestamp=t,this.keepAliveFrameId&&cancelAnimationFrame(this.keepAliveFrameId),this.keepAliveFrameId=requestAnimationFrame(this.handleFrameLoop)})),o(this,"handleFrame",(t=>{q(this.frames,(e=>e.call(this,{delta:this.defaultTimestep,timestamp:t})))})),o(this,"getFrames",(()=>this.frames)),o(this,"add",((t,e=!1)=>(this.cancelFrame(),this.frames.includes(t)||this.frames.push(t),e&&!this.keepAliveFrames.includes(t)&&this.keepAliveFrames.push(t),this.start(),this))),o(this,"start",(()=>{this.frameId=requestAnimationFrame(this.handleFrame),this.keepAliveFrameId=requestAnimationFrame(this.handleFrameLoop)})),o(this,"cancelFrame",(()=>{null!=this.frameId&&(cancelAnimationFrame(this.frameId),this.frameId=null),null!=this.keepAliveFrameId&&(cancelAnimationFrame(this.keepAliveFrameId),this.keepAliveFrameId=null)})),o(this,"stopFrame",((t,e)=>{const o=t.indexOf(e);-1!==o&&t.splice(o,1),0===t.length&&(this.cancelFrame(),this.lastTimestamp=null)})),o(this,"remove",(t=>(this.stopFrame(this.frames,t),this.stopFrame(this.keepAliveFrames,t),this))),o(this,"clear",(()=>(this.frames=[],this.keepAliveFrames=[],this.cancelFrame(),this.lastTimestamp=null,this))),this.frameId=null,this.keepAliveFrameId=null,this.lastTimestamp=null,this.frames=[],this.keepAliveFrames=[],this.defaultTimestep=1/60*1e3}};function tt(t){return t.replace(/[A-Z]/g,(t=>`_${t.toLowerCase()}`))}function et(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const ot={snakeToCamel:function(t){return t.replace(/([_]\w)/g,(t=>t[1].toUpperCase()))},snakeToPascal:function(t){return t.replace(/(\-\w|\_\w)/g,(t=>t[1].toUpperCase())).replace(/^(\w)/,(t=>t[0].toUpperCase()))},camelToSnake:tt,camelToPascal:function(t){return t.replace(/^(\w)/,(t=>t[0].toUpperCase()))},pascalToSnake:function(t){return tt(t).replace(/^_/g,"")},pascalToCamel:function(t){return t.replace(/^(\w)/,(t=>t[0].toLowerCase()))},kebabToCamel:function(t){return t.replace(/([-]\w)/g,(t=>t[1].toUpperCase()))},kebabToPascal:function(t){return t.replace(/([-]\w)/g,(t=>t[1].toUpperCase())).replace(/^(\w)/,(t=>t[0].toUpperCase()))},camelToKebab:et,pascalToKebab:function(t){return et(t).replace(/^-/g,"")}};function it(t){const e=t.trim();if(!/^{|\[/g.test(e))return{};try{const t=new Function(`return ${e}`)();return JSON.parse(JSON.stringify(t))}catch{return/^\[/g.test(e)?[]:{}}}function st(t,e){switch(e){case"string":default:return t;case"number":return Number(t);case"string | number":{const e=Number(t);return isNaN(e)?t:e}case"boolean":return"true"===t||""===t;case"object":case"array":return it(t)}}function nt(t,{pick:e,types:o,camelCase:i=!0,propTransformer:s}={}){let n={};if(null==t)return n;const r=Array.from(t.attributes);null==e&&(e=Z(r,(t=>t.name)));for(const t of r){let r=i?ot.kebabToCamel(t.name):t.name;const a=null==o?void 0:o[r];null!=t.value&&(null==e?void 0:e.includes(r))&&("function"==typeof s&&(r=s(r)),n=o&&null!=a?{...n,[r]:st(t.value,a)}:{...n,[r]:t.value})}return n}function rt(t,{width:e,height:o}={}){const i=t.replace(/(\?|&)width=\d*/g,""),s=i.includes("?")?"&":"?";return`${i}${e?`${s}width=${e}`:""}${o?`${s}height=${o}`:""}`}function at({inputRange:t,outputRange:e,value:o,easing:i=t=>t,reverseEasing:s=!1,extrapolate:n="extend"}){const r=Z(t,((o,i)=>({input:t[i],output:e[i]}))).sort(((t,e)=>t.input-e.input)),a=Z(r,(({input:t})=>t)),l=Z(r,(({output:t})=>t));if(o<=a[0])return l[0];if(o>=a[a.length-1])return l[l.length-1];let c=0;for(const t of a)t{const t=document.documentElement;ct?t.classList.add("is-mobile"):t.classList.add("is-desktop")}));const ht=t=>Object.values(t);function dt(t){const e=null==t?void 0:t.ownerDocument,o=e.documentElement,i=function(t){return 9===t.nodeType&&t.defaultView}(e);let s={top:0,left:0};return e?(typeof t.getBoundingClientRect<"u"&&(s=t.getBoundingClientRect()),{top:s.top+i.scrollY-o.clientTop,left:s.left+i.scrollX-o.clientLeft}):{top:0,left:0}}class ut{constructor(t){o(this,"dx"),o(this,"dy"),o(this,"vx",0),o(this,"vy",0),o(this,"isStart",!1),o(this,"startX",0),o(this,"startX2",0),o(this,"startY",0),o(this,"startY2",0),o(this,"options"),o(this,"handleMouseDown",(t=>{const{onStart:e}=this.options;if("touchstart"===t.type&&t.touches.length>1||"mousedown"===t.type&&0!==t.button)return;const o=t.target;!ct&&(o.closest("a")||o.closest("img"))&&t.preventDefault(),this.isStart=!0,"touchstart"===t.type?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY,this.startX2=t.touches[0].clientX,this.startY2=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY,this.startX2=t.clientX,this.startY2=t.clientY),null==e||e(t),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleMouseMove,{passive:!1}),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleMouseUp)})),o(this,"handleMouseMove",(t=>{const{onMove:e}=this.options;if("touchmove"===t.type&&t.touches.length>1||"mousemove"===t.type&&0!==t.button||(ct||t.preventDefault(),!this.isStart))return;let o,i;"touchmove"===t.type?(o=t.touches[0].clientX,i=t.touches[0].clientY):(o=t.clientX,i=t.clientY);const s=o-this.startX,n=i-this.startY;this.startX=o,this.startY=i,this.dx+=s,this.dy+=n,this.vx=s,this.vy=n,null==e||e({dx:this.dx,dy:this.dy,vx:this.vx,vy:this.vy,isHorizontalSwipe:Math.abs(o-this.startX2)>Math.abs(i-this.startY2)},t)})),o(this,"handleEnd",((t,e)=>{const{onEnd:o}=this.options;!this.isStart||(this.isStart=!1,e&&(this.dx=e.dx,this.dy=e.dy,this.vx=e.vx,this.vy=e.vy),null==o||o({dx:this.dx,dy:this.dy,vx:this.vx,vy:this.vy},t),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("touchmove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleMouseUp))})),o(this,"handleMouseUp",(t=>{ct||t.preventDefault(),this.handleEnd(t)})),o(this,"setValue",(({dx:t,dy:e})=>{null!=t&&(this.dx=t),null!=e&&(this.dy=e)})),o(this,"destroy",(()=>{this.options.element.removeEventListener("mousedown",this.handleMouseDown),this.options.element.removeEventListener("touchstart",this.handleMouseDown),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("touchmove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleMouseUp)})),this.options=t,this.dx=t.dx||0,this.dy=t.dy||0,t.element.addEventListener("mousedown",this.handleMouseDown),ct&&t.element.addEventListener("touchstart",this.handleMouseDown)}}function pt(t){return new ut(t)}class mt{constructor(t,e){o(this,"target"),o(this,"options"),o(this,"top"),o(this,"left"),o(this,"handlePlacement",(()=>{const{element:t,placement:e,offset:o}=this.options,{offsetWidth:i,offsetHeight:s}=this.target,{top:n,left:r}=dt(this.target),{offsetWidth:a,offsetHeight:l}=t;switch(e){case"top-left":this.top=n-l-o,this.left=r;break;case"top-center":this.top=n-l-o,this.left=r+i/2-a/2;break;case"top-right":this.top=n-l-o,this.left=r+i-a;break;case"bottom-left":this.top=n+s+o,this.left=r;break;case"bottom-center":this.top=n+s+o,this.left=r+i/2-a/2;break;case"bottom-right":this.top=n+s+o,this.left=r+i-a;break;case"left-top":this.top=n,this.left=r-a-o;break;case"left-center":this.top=n+s/2-l/2,this.left=r-a-o;break;case"left-bottom":this.top=n+s-l,this.left=r-a-o;break;case"right-top":this.top=n,this.left=r+i+o;break;case"right-center":this.top=n+s/2-l/2,this.left=r+i+o;break;case"right-bottom":this.top=n+s-l,this.left=r+i+o}})),o(this,"checkBoundary",(()=>{const{element:t}=this.options,{offsetWidth:e,offsetHeight:o}=t,{clientWidth:i,clientHeight:s}=document.documentElement;this.tops+window.scrollY&&(this.top=s+window.scrollY-o),this.left<0?this.left=window.scrollX:this.left+e>i+window.scrollX&&(this.left=i+window.scrollX-e)})),o(this,"init",(()=>{const{element:t}=this.options,{width:e,height:o}=t.getBoundingClientRect();return this.handlePlacement(),this.checkBoundary(),{top:this.top,left:this.left,width:e,height:o}})),this.target=t,this.options=e,this.top=0,this.left=0}}function xt(t,{element:e,placement:o="bottom-center",offset:i=0}){return new mt(t,{element:e,placement:o,offset:i}).init()}const gt=function(t,e=!1){const o=e?{}:[],i=new URLSearchParams(t);for(const t of i.entries())if(e){const[e,i]=t;o[e]=i}else o.push([t[0],t[1]]);return o},vt=function(t){return new URLSearchParams(t).toString().replace(/&/g,"&\n").replace(/\w.*=&?$/gm,"").replace(/\n+/g,"").replace(/&$/g,"")};function bt(t,e,o=.55){return t*e*o/(e+o*t)}function ft(t,e,o,i){return oe?bt(o-e,e-t,i)+e:o}const yt=function(){let t=!1;return(()=>{if(!t){t=!0;const e="@xoLocalStorageCheck";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}return!0})()?window.localStorage:{getItem(){return null},setItem(){},removeItem(){},clear(){},key(){return null},length:0}}();class Et{constructor(t={}){o(this,"_store"),o(this,"_prevStore"),o(this,"_options"),o(this,"_listeners"),o(this,"_storageRegisters"),o(this,"_useDeepEquals"),o(this,"_handleListeners",(t=>{if(this._listeners[t]){const e=this.get(t);for(let o=0;o{const o=yt.getItem(t);return null!=o&&void 0!==o&&this._storageRegisters[t]?JSON.parse(o):e})),o(this,"_setStorage",((t,e)=>{if(t&&void 0!==e&&this._storageRegisters[t]){const o=JSON.stringify(e);yt.setItem(t,o)}})),o(this,"_set",((t,e)=>{const{logger:o,loggerCollapsed:i}=this._options;return(this._useDeepEquals[t]?!j(this._store[t],e):this._store[t]!==e)&&(this._prevStore[t]=D(this._store[t]),this._store[t]=e,this._setStorage(t,e),this._handleListeners(t),o)?o=>{Et.logger(o,e,t,i,this._prevStore,this._store)}:()=>{}})),o(this,"create",((t,{initialState:e,useStorage:o,useDeepEqual:i})=>{const{logger:s,loggerCollapsed:n}=this._options;this._store[t]||(this._storageRegisters[t]=o,this._getState(t,e)||this._setStorage(t,e),this._store[t]=this._getState(t,e),o||yt.removeItem(t),this._handleListeners(t),s&&Et.logger("@store/initialState",e,t,n)),this._useDeepEquals[t]||(this._useDeepEquals[t]=!!i)})),this._store={},this._prevStore={},this._listeners={},this._storageRegisters={},this._options={logger:t.logger||!1,loggerCollapsed:t.loggerCollapsed||!1},this._useDeepEquals={}}static logger(t,e,o,i=!1,s,n){const r=(new Date).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),a=o,l=a.length<9?Array(9-a.length).fill(" ").join(""):"";console[i?"groupCollapsed":"group"](`%c XOStore: ${t}`,"color: #614eff",`@${r}`),s&&console.log("%c Prev Store ","color: #999; font-weight: 600",s),console.log(`%c ${a} ${l}`,"color: #44b0e2; font-weight: 600",e),n&&console.log("%c Next Store ","color: #7ac143; font-weight: 600",n),console.groupEnd()}get(t){return t?this._store[t]:this._store}set(t,e){if("function"==typeof e){const o=e,i=this._store[t];return this._set(t,o(i))}return this._set(t,e)}subscribe(t,e,o){if(this._listeners[t]=this._listeners[t]||[],this._listeners[t].push({listener:e,equal:o}),Object.keys(this._store).includes(t)){const i=this.get(t),s=D(this._prevStore[t]);o&&o(s,i)||e(i)}return()=>{this._listeners[t]=R(this._listeners[t],(({listener:t})=>t!==e))}}}let wt=null;function St(){if(!document.body||document.body.scrollHeight<=window.innerHeight)return 0;const t=document.createElement("div");return t.style.display="block",t.style.width="100px",t.style.height="100px",t.style.overflow="scroll",t.style.position="fixed",t.style.top="-9999px",document.body.appendChild(t),wt=100-t.clientWidth,document.body.removeChild(t),wt}function Ct(t){if(null==t)return;const e=H(t||{}),o=K(e,((o,i,s)=>{var n,r;const a=parseInt(i.toString())||0,l=parseInt((null==(r=null==(n=e[s-1])?void 0:n.toString)?void 0:r.call(n))||"0");return window.innerWidth>l&&window.innerWidth<=a?{...o,...t[i]}:o}),{});return H(o).length?o:void 0}function kt(t,e){let o=window.innerWidth,i=window.innerHeight;return function(...s){var n;const r=this;null!=(n=window.xbEditor)&&n.designMode?e.apply(r,s):("x"===t?o!==window.innerWidth&&e.apply(r,s):"y"===t&&i!==window.innerHeight&&e.apply(r,s),o=window.innerWidth,i=window.innerHeight)}}const At=async({file:t,content:e,insertPosition:o="beforeend",id:i,parentElement:s=document.head,type:n})=>{if(i){const t=document.getElementById(i);null==t||t.remove()}const r=document.createElement("script");return i&&(r.id=i),t&&(r.src=t,n&&(r.type=n)),e&&(r.textContent=e),t||e?(s.insertAdjacentElement(o,r),new Promise((t=>{r.onload=()=>{t(r)}}))):new Promise((t=>{t(r)}))};class Pt{static toArray(t){const e=[],o=t.match(/[a-df-z][^a-df-z]*/gi);if(!o)return e;for(let t=0;t+t));e.push({type:s,values:n})}return e}static toString(t){let e="";for(let o=0;o{const t=this.__proto__.constructor.propTypes,e=this.__proto__.constructor.defaultProps,o=nt(this,{pick:Object.keys(t),types:t});this.props={...e,...o}})),o(this,"handlePropUpdate",(()=>{const t=this.__proto__.constructor.observedProps;!t||!t.length||(this.$attributeObserver$=new MutationObserver((e=>{e.forEach((e=>{const o=e.attributeName;if(o&&"attributes"===e.type){const i=ot.kebabToCamel(o),s=e.oldValue,n=this.getAttribute(o);t.includes(i)&&s!==n&&(this._setProps(),this.propUpdate({name:i,prevProp:s,nextProp:n}))}}))})),this.$attributeObserver$.observe(this,{attributes:!0,attributeOldValue:!0,attributeFilter:t.map((t=>ot.camelToKebab(t)))}))}))}setState(t){const e=this.state;"object"!=typeof t||Array.isArray(t)||null===t?"function"==typeof t&&(this.state={...this.state,...t(e)}):this.state={...this.state,...t},this.stateUpdate(e)}setProps(t){const e=this.props;"object"!=typeof t||Array.isArray(t)||null===t?"function"==typeof t&&(this.props={...this.props,...t(e)}):this.props={...this.props,...t},Object.entries(this.props).forEach((([t,e])=>{const o=t.includes("-")?t:ot.camelToKebab(t);"boolean"==typeof e?$(this,o,e):this.setAttribute(o,"string"==typeof e?e:JSON.stringify(e))}))}connectedCallback(){this._setProps(),this.setProps({}),this.mount(),this.handlePropUpdate()}disconnectedCallback(){var t;null==(t=this.$attributeObserver$)||t.disconnect(),this.unmount()}emit(t,e){const o=new CustomEvent(t,e);return this.dispatchEvent(o),o}stateUpdate(t){}propUpdate({name:t,prevProp:e,nextProp:o}){}mount(){}unmount(){}}function $t(t,e){return o=>{window.customElements.get(t)||window.customElements.define(t,o,e)}}function Lt(t){return new Promise((e=>{0===t.length&&e();let o=0;t.forEach((i=>{const s=new Image,n=()=>{o+=1,o===t.length&&e()};s.onload=n,s.onerror=t=>{console.error(t),n()},s.src=i}))}))}function It(){return"function"==typeof HTMLDialogElement}function Ot(t){var e;!It()||t.hasAttribute("popover")&&(null==(e=null==t?void 0:t.showPopover)||e.call(t))}function Nt(t){var e;!It()||t.hasAttribute("popover")&&(null==(e=null==t?void 0:t.hidePopover)||e.call(t))}o(Mt,"defaultProps",{}),o(Mt,"propTypes",{}),o(Mt,"observedProps",[]);const Dt="width",qt=null!=(e=null==window?void 0:window.xoImgDevicePixelRatio)?e:1.5,Ht=null!=(i=null==window?void 0:window.xoImgDevicePixelRatio)?i:1.5;function Ft(t,e,o,i){const s=t;if(!s)return"";if(s.includes("data:"))return s;const n=s.replace(/(\?|&)(w|width)=\d*/g,"").replace(new RegExp(`(\\?|&)${Dt}=\\d*`,"g"),""),r=O(window.devicePixelRatio,qt,Ht),a=O(Math.min(Math.round(e*r),2e3),o,i);if(0===a)return s;const l=`${Dt}=${a}`;return n.includes("?")?`${n}&${l}`:`${n}?${l}`}function Rt(t){return it(t.getAttribute("xo-width-range")||t.getAttribute("data-width-range")||"[200, 1920]")}function Vt(t){const e=function(t){return{intrinsicWidth:Number(t.getAttribute("xo-intrinsic-width"))||Number(t.getAttribute("data-intrinsic-width"))||0,intrinsicHeight:Number(t.getAttribute("xo-intrinsic-height"))||Number(t.getAttribute("data-intrinsic-height"))||0}}(t),o=function(t){return Number(t.getAttribute("xo-fallback-width"))||Number(t.getAttribute("data-fallback-width"))||400}(t),{width:i,height:s}=t.getBoundingClientRect(),n=t.parentElement,r=function(t){return t.hasAttribute("xo-width-range")||t.hasAttribute("data-width-range")}(t)?i:Math.max(i,o);if(!n)return r;if(function(t){return t.intrinsicWidth>0&&t.intrinsicHeight>0}(e)){const{intrinsicWidth:t,intrinsicHeight:o}=e,i=t/o;return i>r/s?Math.round(s*i):Math.round(r)}return r}const zt={CircleBar:"xo-circle-bar",ScrollX:"xo-scroll-x",ScrollXInner:"xo-scroll-x-inner",ScrollXItem:"xo-scroll-x-item",Toggle:"xo-toggle",ToggleTrigger:"xo-toggle-trigger",Modal:"xo-modal",ModalTrigger:"xo-modal-trigger",ModalInner:"xo-modal-inner",ModalContent:"xo-modal-content",ModalBackdrop:"xo-modal-backdrop",ModalPan:"xo-modal-pan",Toast:"xo-toast",ToastPortal:"xo-toast-portal",ToastContent:"xo-toast-content",ToastPlaceholder:"xo-toast-placeholder",ToastCloseButton:"xo-toast-close-button",Popover:"xo-popover",PopoverTrigger:"xo-popover-trigger",BuilderPopover:"xo-builder-popover",BuilderPopoverContent:"xo-builder-popover-content",Tooltip:"xo-tooltip",TooltipContent:"xo-tooltip-content",TooltipTrigger:"xo-tooltip-trigger",Sticky:"xo-sticky",StickyInner:"xo-sticky-inner",StickyContent:"xo-sticky-content",StickySpace:"xo-sticky-space",Collapse:"xo-collapse",CollapseTrigger:"xo-collapse-trigger",CollapseProvider:"xo-collapse-provider",List:"xo-list",ListTrigger:"xo-list-trigger",ListPortal:"xo-list-portal",ListItem:"xo-list-item",Tabs:"xo-tabs",TabsPane:"xo-tabs-pane",TabsTrigger:"xo-tabs-trigger",TabsActive:"xo-tabs-active",Parallax:"xo-parallax",ParallaxScroll:"xo-parallax-scroll",ParallaxHover:"xo-parallax-hover",ParallaxHoverInner:"xo-parallax-hover-inner",Carousel:"xo-carousel",CarouselThumbnail:"xo-carousel-thumbnail",CarouselList:"xo-carousel-list",CarouselInner:"xo-carousel-inner",CarouselSlide:"xo-carousel-slide",CarouselNext:"xo-carousel-next",CarouselPrev:"xo-carousel-prev",CarouselPagination:"xo-carousel-pagination",CarouselBullet:"xo-carousel-bullet",CarouselSize:"xo-carousel-size",CarouselPage:"xo-carousel-page",CarouselTrigger:"xo-carousel-trigger",ScrollCarousel:"xo-scroll-carousel",ScrollCarouselNext:"xo-scroll-carousel-next",ScrollCarouselPrev:"xo-scroll-carousel-prev",Range:"xo-range",RangePrice:"xo-range-price",RangeTrack:"xo-range-track",RangeThumb:"xo-range-thumb",RangeProgress:"xo-range-progress",Filters:"xo-filters",FiltersMobile:"xo-filters-mobile",FiltersField:"xo-filters-field",FiltersContent:"xo-filters-content",FiltersRefine:"xo-filters-refine",FiltersClear:"xo-filters-clear",FiltersFallback:"xo-filters-fallback",FiltersCount:"xo-filters-count",FiltersActiveSize:"xo-filters-active-size",FiltersPaginate:"xo-filters-paginate",FiltersTop:"xo-filters-top",FiltersSortBySelected:"xo-filters-sort-by-selected",FiltersRefineClearIcon:"xo-filters-refine-clear-icon",Gallery:"xo-gallery",GalleryItem:"xo-gallery-item",GalleryPortal:"xo-gallery-portal",GalleryNext:"xo-gallery-next",GalleryPrev:"xo-gallery-prev",GalleryCounter:"xo-gallery-counter",Cart:"xo-cart",CartMini:"xo-cart-mini",CartSize:"xo-cart-size",CartAdd:"xo-cart-add",CartFly:"xo-cart-fly",CartRemove:"xo-cart-remove",CartChangeFallback:"xo-cart-change-fallback",CartQuantity:"xo-cart-quantity",CartQuantityMinus:"xo-cart-quantity-minus",CartQuantityPlus:"xo-cart-quantity-plus",CartNote:"xo-cart-note",CartNoteSubmit:"xo-cart-note-submit",CartShippingRates:"xo-cart-shipping-rates",CartShippingRatesField:"xo-cart-shipping-rates-field",CartShippingRatesSubmit:"xo-cart-shipping-rates-submit",CartShippingRatesError:"xo-cart-shipping-rates-error",CartDiscount:"xo-cart-discount",CartDiscountSubmit:"xo-cart-discount-submit",CartScroll:"xo-cart-scroll",CartAddError:"xo-cart-add-error",CartAddErrorMessage:"xo-cart-add-error-message",CartWillChange:"xo-cart-will-change",Product:"xo-product",ProductWillChange:"xo-product-will-change",ProductVariant:"xo-product-variant",ProductVariantActive:"xo-product-variant-active",ProductData:"xo-product-data",ProductPickupAvailability:"xo-product-pickup-availability",ProductPickupAvailabilityList:"xo-product-pickup-availability-list",ProductQuickView:"xo-product-quick-view",ProductQuickViewTrigger:"xo-product-quick-view-trigger",ProductQuickViewVariant:"xo-product-quick-view-variant",ProductLiquidStatic:"xo-product-liquid-static",ProductVariantSelected:"xo-product-variant-selected",ProductRecipientForm:"xo-product-recipient-form",ProductRecipientFormError:"xo-product-recipient-form-error",ProductRecommendations:"xo-product-recommendations",MarqueeScrollTransform:"xo-marquee-scroll-transform",Marquee:"xo-marquee",MarqueeItem:"xo-marquee-item",Group:"xo-group",GroupButton:"xo-group-button",Animate:"xo-animate",AnimateItem:"xo-animate-item",ImageZoom:"xo-image-zoom",ImageZoomInner:"xo-image-zoom-inner",ImageZoomItem:"xo-image-zoom-item",ImageZoomThumb:"xo-image-zoom-thumb",ImageZoomManual:"xo-image-zoom-manual",Countdown:"xo-countdown",CountdownDay:"xo-countdown-day",CountdownHour:"xo-countdown-hour",CountdownMinute:"xo-countdown-minute",CountdownSecond:"xo-countdown-second",Countto:"xo-countto",CounttoNumber:"xo-countto-number",VideoCover:"xo-video-cover",VideoCoverButton:"xo-video-cover-button",VideoCoverItem:"xo-video-cover-item",Ripple:"xo-ripple",RippleItem:"xo-ripple-item",Typing:"xo-typing",TypingInner:"xo-typing-inner",TypingContent:"xo-typing-content",ImageComparison:"xo-image-comparison",Instagram:"xo-instagram",InstagramTemplate:"xo-instagram-template",InstagramItem:"xo-instagram-item",InstagramNext:"xo-instagram-next",InstagramPrev:"xo-instagram-prev",DarkMode:"xo-dark-mode",MegaMenu:"xo-mega-menu",Masonry:"xo-masonry",MasonryItem:"xo-masonry-item",Lazyload:"xo-lazyload",Cursor:"xo-cursor",CursorItem:"xo-cursor-item",VirtualScroll:"xo-virtual-scroll",Drr:"xo-drr",Drr2:"xo-drr-2",DrrAction:"xo-drr-action",Xo360Viewer:"xo-360-viewer",Xo360ViewerContent:"xo-360-viewer-content",Xo360ViewerNext:"xo-360-viewer-next",Xo360ViewerPrev:"xo-360-viewer-prev",Xo360ViewerPlay:"xo-360-viewer-play",Xo360ViewerPause:"xo-360-viewer-pause",Magnetic:"xo-magnetic",MagneticContent:"xo-magnetic-content",LineChart:"xo-line-chart",ScrollScene:"xo-scroll-scene",ScrollSceneInner:"xo-scroll-scene-inner",ScrollSceneItem:"xo-scroll-scene-item",CollectionTabs:"xo-collection-tabs",CollectionTabsTrigger:"xo-collection-tabs-trigger",CollectionTabsContent:"xo-collection-tabs-content"},_t=new Map;class Bt extends HTMLImageElement{constructor(){super(...arguments),o(this,"removeOverlay",(async()=>{var t;window.XO_DEV&&await X(1e3);const e=null==(t=this.parentElement)?void 0:t.querySelector(".xo-lazyload-overlay");null==e||e.remove()})),o(this,"handleLoad",(()=>{this.removeEventListener("load",this.handleLoad),this.removeOverlay()})),o(this,"init",(async()=>{const t=this.getAttribute("xo-src")||this.getAttribute("data-src")||this.src,[e,o]=Rt(this);"lazy"!==this.loading&&(this.loading="lazy"),this.closest(zt.CarouselSlide)&&(_t.has(this.src)||await X(50)),(()=>{const i=Vt(this),s=Ft(t,i,e,o);t&&(this.src=s,_t.set(this.src,s)),this.srcset&&(this.srcset=`${s} ${i}w`),(this.complete||_t.has(this.src))&&this.removeOverlay(),this.addEventListener("load",this.handleLoad)})()})),o(this,"handleResize",U((()=>this.init()),500))}static get observedAttributes(){return["xo-src","data-src"]}connectedCallback(){this.init(),window.addEventListener("resize",this.handleResize,!1)}disconnectedCallback(){this.removeEventListener("load",this.handleLoad),window.removeEventListener("resize",this.handleResize,!1)}attributeChangedCallback(t,e,o){e!==o&&this.init()}}let Wt=null;function Ut(t=document){!function(t){function e(t){const e=function(t){const e=t.replace(/url\(["']|["']\)/g,"");return e===window.location.href.replace(/\?.*/g,"")||"none"===e?"":e}(window.getComputedStyle(t).backgroundImage)||t.getAttribute("xo-src")||t.getAttribute("data-src")||"";if(e){const[o,i]=Rt(t),s=Ft(e,Vt(t),o,i);t.style.backgroundImage=`url('${s}')`;const n=t.querySelector(".xo-lazyload-overlay");null==n||n.remove()}}"IntersectionObserver"in window?(null==Wt||Wt.disconnect(),Wt=new IntersectionObserver((t=>{t.forEach((async t=>{if(await X(window.XO_DEV?1e3:50),t.isIntersecting){const o=t.target;e(o),null==Wt||Wt.unobserve(o)}}))})),t.forEach((t=>{null==Wt||Wt.observe(t)}))):t.forEach(e)}(Array.from(t.querySelectorAll(".xo-background-lazyload")))}var Xt;Y(Ut),document.addEventListener("shopify:section:load",(t=>Ut(t.target))),document.addEventListener("shopify:section:reorder",(t=>Ut(t.target))),window.addEventListener("resize",U((()=>Ut()),500)),customElements.get(zt.Lazyload)||customElements.define(zt.Lazyload,Bt,{extends:"img"}),null!=(Xt=window.xbEditor)&&Xt.designMode||window.addEventListener("click",(t=>{const e=t.target.closest("[xb-href]"),o=null==e?void 0:e.getAttribute("xb-href");o&&(t.preventDefault(),"_blank"===e.getAttribute("xb-target")||t.ctrlKey||t.metaKey?window.open(o,"_blank"):window.location.href=o)}));const Yt=(t,e,o)=>t+(e-t)*o,Gt="===empty===",jt=1e3/60,Qt=/(px|%|vh|vw|em|rem|pt|cm|mm|in|pc|ex|ch|vmin|vmax|lh|rlh|vb|vi|svw|svh|lvw|lvh|dvw|dvh|deg)/g;class Zt{constructor(t,e,i){o(this,"el"),o(this,"cloneEl"),o(this,"options"),o(this,"contextOptions"),o(this,"currentValue"),o(this,"targetValue"),o(this,"handleFrameSyncUpdate",(({delta:t})=>{const{lerpEase:e}=this.contextOptions;if(Math.abs(this.targetValue-this.currentValue)<.001)return;let o=t/jt;const i=Math.round(o);i>=1&&(o=i);const s=Yt(this.currentValue,this.targetValue,e*o);this.setStyles(this.el,s),this.currentValue=s})),o(this,"destroy",(()=>{if(this.el){const{style:t}=this.cloneEl;this.el.removeAttribute("style"),q(Array.from(t),(e=>{const o=t[e];this.el.style[e]=o})),J.remove(this.handleFrameSyncUpdate)}})),o(this,"getElement",(()=>this.el)),this.el=t,this.cloneEl=this.el.cloneNode(),this.options=e,this.contextOptions=i,this.currentValue=0,this.targetValue=0,J.add(this.handleFrameSyncUpdate,!0)}getInputRange(){const{keyframes:t}=this.options;return K(H(t),((t,e)=>{const o=Number(e.replace("%",""));return isNaN(o)?t:[...t,o]}),[]).sort(((t,e)=>t-e))}getKeyframesByProp(t){const{keyframes:e}=this.options,o=this.getInputRange();Math.max(...o)>100&&L("Max value of input range must be less than 100%");let i=null;return K(o,((o,s)=>{const n=e[`${s}%`][t];return null!=n&&o.push(String(n)),i=o[o.length-1],null==n&&null!=i&&o.push(i),o}),[])}getDefaultUnit(t){switch(t){case"x":case"y":case"width":case"height":case"backgroundPositionY":case"blur":case"borderRadius":return"px";case"rotate":case"rotateX":case"rotateY":case"skew":case"skewX":case"skewY":case"hueRotate":return"deg";case"backgroundSizeX":case"backgroundSizeY":case"grayscale":return"%";default:return""}}interpolate(t,e){const o=this.getKeyframesByProp(e),i=String(o[0]).replace(/[0-9.,-]/g,""),s=o.map((t=>Number(String(t).replace(Qt,""))));return 0===o.length?Gt:`${at({value:t,inputRange:this.getInputRange(),outputRange:s})}${i||this.getDefaultUnit(e)}`}setStyles(t,e){const{setStyles:o}=this.contextOptions,i=this.interpolate(e,"x"),s=this.interpolate(e,"y"),n=this.interpolate(e,"rotate"),r=this.interpolate(e,"rotateX"),a=this.interpolate(e,"rotateY"),l=this.interpolate(e,"scale"),c=this.interpolate(e,"scaleX"),h=this.interpolate(e,"scaleY"),d=this.interpolate(e,"skew"),u=this.interpolate(e,"skewX"),p=this.interpolate(e,"skewY"),m=this.interpolate(e,"opacity"),x=this.interpolate(e,"borderRadius"),g=this.interpolate(e,"width"),v=this.interpolate(e,"height"),b=this.interpolate(e,"brightness"),f=this.interpolate(e,"contrast"),y=this.interpolate(e,"hueRotate"),E=this.interpolate(e,"blur"),w=this.interpolate(e,"grayscale"),S=this.interpolate(e,"backgroundPositionY"),C=this.interpolate(e,"backgroundSizeX"),k=this.interpolate(e,"backgroundSizeY"),A=this.interpolate(e,"videoTime"),P=this.interpolate(e,"groupImg"),T=[];if(t.style.transform=R([`translateX(${i})`,`translateY(${s})`,`rotate(${n})`,`rotateX(${r})`,`rotateY(${a})`,`scale(${l})`,`scaleX(${c})`,`scaleY(${h})`,`skew(${d})`,`skewX(${u})`,`skewY(${p})`],(t=>!!t&&!t.includes(Gt))).join(" "),g!==Gt&&(t.style.width=`${g}`),v!==Gt&&(t.style.height=`${v}`),m!==Gt&&(t.style.opacity=`${m}`),x!==Gt&&(t.style.borderRadius=`${x}`),b!==Gt&&T.push(`brightness(${b})`),f!==Gt&&T.push(`contrast(${f})`),y!==Gt&&T.push(`hue-rotate(${y})`),E!==Gt&&T.push(`blur(${E})`),w!==Gt&&T.push(`grayscale(${w})`),T.length>0&&(t.style.filter=T.join(" ")),S!==Gt&&(t.style.backgroundSize="cover",t.style.backgroundPosition="center",lt?t.style.backgroundPosition=`50% calc(${S} * -1)`:(t.style.backgroundAttachment="fixed",t.style.backgroundPosition=`50% ${S}`)),C!==Gt&&k===Gt&&(t.style.backgroundSize=`${C} 100%`),C===Gt&&k!==Gt&&(t.style.backgroundSize=`100% ${k}`),C!==Gt&&k!==Gt&&(t.style.backgroundSize=`${C} ${k}`),A!==Gt){const e=t.querySelector("video");if(e&&e.duration){const t=at({value:Number(A.replace(Qt,"")),inputRange:[0,100],outputRange:[0,e.duration]});e.currentTime=t}}if(P!==Gt){"static"===window.getComputedStyle(t).position&&(t.style.position="relative");const e=Array.from(t.querySelectorAll("img")),o=Math.floor(at({value:Number(P.replace(Qt,"")),inputRange:[0,100],outputRange:[0,e.length-1]}));q(e,((t,e)=>{t.style.opacity=e===o?"1":"0"}))}o&&o({element:t,createValue:t=>this.interpolate(e,t),EMPTY:Gt})}handleParallax(){const t=O((window.scrollY-this.getFrom())/(this.getTo()-this.getFrom())*100,0,100);t>=0&&t<=100&&(this.targetValue=t)}getFrom(){const{from:t}=this.options;return"function"==typeof t?t():t}getTo(){const{to:t}=this.options;return"function"==typeof t?t():t}init(){this.handleParallax()}}const Kt=class{constructor(t){o(this,"options"),o(this,"items"),o(this,"handlerScroll",(()=>{for(const t of this.items)t.init()})),o(this,"add",((t,e)=>(this.items.push(new Zt(t,e,this.options)),this))),o(this,"remove",(t=>{const e=this.items.find((e=>e.getElement()===t));this.items=this.items.filter((e=>e.getElement()!==t)),e&&e.destroy()})),o(this,"run",(()=>{const{targetElement:t}=this.options;this.handlerScroll(),t.removeEventListener("scroll",this.handlerScroll,!1),t.addEventListener("scroll",this.handlerScroll,!1)})),o(this,"destroy",(()=>{const{targetElement:t}=this.options;t.removeEventListener("scroll",this.handlerScroll,!1);for(const t of this.items)t.destroy()})),this.options={...Kt.defaultOptions,...t},this.items=[]}};let Jt=Kt;function te(t={}){return new Jt(t)}o(Jt,"defaultOptions",{targetElement:window,setStyles:void 0,lerpEase:.08}),window.xoParallaxScroll=te;const ee=class extends HTMLElement{constructor(){super(...arguments),o(this,"index",0),o(this,"frameId",0),o(this,"cancelDelay",(()=>{})),o(this,"_options"),o(this,"imageLoaded",!1),o(this,"parallax",null),o(this,"disconnect",(()=>{})),o(this,"setOptions",(()=>{this.options=nt(this,{pick:["xoSpeed","xoRtl","xoPauseOnHover","xoScrollEnabled","xoScrollSpeed","xoAutoRun"],types:{xoSpeed:"number",xoRtl:"boolean",xoPauseOnHover:"boolean",xoScrollEnabled:"boolean",xoAutoRun:"boolean",xoScrollSpeed:"number"}})})),o(this,"getChildWidth",(()=>{const t=Array.from(this.children);return K(t,((e,o,i)=>i{const t=Array.from(this.querySelectorAll("img")).map((t=>t.src));await Lt(t);const{xoSpeed:e,xoRtl:o,xoAutoRun:i}=this.options;if(i){const t=this.children[0],i=O(14*t.offsetWidth-(e-1)*t.offsetWidth,t.offsetWidth,1/0);this.style.setProperty("--xo-marquee-from","0"),this.style.setProperty("--xo-marquee-to",o?"100%":"-100%"),this.style.setProperty("--xo-marquee-duration",`${i}ms`)}})),o(this,"handleClone",(()=>{const{xoScrollEnabled:t,xoScrollSpeed:e}=this.options;this.frameId=requestAnimationFrame((()=>{const o=Array.from(this.children);if(0===this.getChildWidth()){const t=this.appendChild(o[this.index].cloneNode(!0));$(t,"xo-cloned",!0),this.setDuration(),cancelAnimationFrame(this.frameId)}else if(this.getChildWidth()<=this.offsetWidth*(t?2*Math.min(e,3):1)){const t=this.appendChild(o[this.index].cloneNode(!0));$(t,"xo-cloned",!0),this.handleClone(),this.index===o.length-1?this.index=0:this.index++,o.length>=200&&this.update()}else{const t=this.appendChild(o[this.index].cloneNode(!0));$(t,"xo-cloned",!0),this.setDuration(),cancelAnimationFrame(this.frameId)}}))})),o(this,"removeCloned",(()=>{q(Array.from(this.querySelectorAll(`${zt.MarqueeItem}[xo-cloned]`)),(t=>{t.remove()}));const t=this.querySelector(zt.MarqueeItem);t&&(q(Array.from(t.children),(t=>{this.appendChild(t)})),t.remove())})),o(this,"handler",(async()=>{const{xoRtl:t}=this.options,e=Array.from(this.children);if($(this,"xo-rtl",t),!this.imageLoaded){await X(500);const t=Array.from(this.querySelectorAll("img")).map((t=>t.src));await Lt(t),this.imageLoaded=!0}if(e[0].tagName.toLowerCase()!==zt.MarqueeItem){const t=document.createElement(zt.MarqueeItem);q(e,(e=>{t.appendChild(e)})),this.appendChild(t)}this.handleClone(),requestAnimationFrame((()=>{$(this,"xo-ready",!0)}))})),o(this,"handleParallax",(()=>{var t;const{xoScrollEnabled:e,xoScrollSpeed:o,xoRtl:i}=this.options;if(!e)return;null==(t=this.parallax)||t.destroy(),this.parallax=te({lerpEase:1,setStyles:({element:t,createValue:e,EMPTY:i})=>{const s=e("marqueeScroll");s!==i&&t.style.setProperty("--xo-marquee-scroll",Number(s)*o+"px")}});const s=this.closest(zt.MarqueeScrollTransform);this.parallax.add(this,{from:()=>s?dt(s).top-window.innerHeight:dt(this).top-window.innerHeight,to:()=>s?dt(s).top+this.getBoundingClientRect().height:dt(this).top+this.getBoundingClientRect().height,keyframes:{"0%":{marqueeScroll:0},"100%":{marqueeScroll:window.innerHeight*(i?1:-1)}}}).run()})),o(this,"destroy",(()=>{var t;null==(t=this.parallax)||t.destroy(),this.cancelDelay(),cancelAnimationFrame(this.frameId),this.index=0})),o(this,"update",(async()=>{this.destroy(),this.setOptions(),this.removeCloned(),await this.handler(),this.handleParallax()})),o(this,"sectionListenerForBuilder",(()=>{this.disconnect=function(t,e){var o;const i=t.closest("section[xo-preset]");if(i&&(null==(o=window.xbEditor)?void 0:o.designMode)){const t=new MutationObserver((()=>{e()}));return t.observe(i,{attributes:!0,attributeFilter:["xo-preset"]}),t.disconnect}return()=>{}}(this,(()=>{this.update()}))}))}get options(){return{...ee.defaultOptions,...this._options}}set options(t){this._options=t}static get observedAttributes(){return["xo-observed"]}async connectedCallback(){var t;null!=(t=window.xbEditor)&&t.designMode&&await X(100),this.setOptions(),this.removeCloned(),await this.handler(),this.handleParallax(),this.sectionListenerForBuilder()}async attributeChangedCallback(t,e,o){"xo-observed"===t&&null!=e&&e!==o&&this.imageLoaded&&(this.cancelDelay(),this.cancelDelay=await X(200),this.update())}disconnectedCallback(){this.destroy(),this.disconnect()}};let oe=ee;o(oe,"defaultOptions",{xoSpeed:6,xoRtl:"rtl"===document.documentElement.dir,xoPauseOnHover:!1,xoAutoRun:!0,xoScrollEnabled:!1,xoScrollSpeed:1}),F({[zt.Marquee]:oe});const ie={none:(t,{value:e})=>{t.style.visibility=0===e?"hidden":"visible"},zoom:(t=!1)=>(e,{value:o,isOpen:i,usePan:s=!1,easing:n})=>{if(s)e.style.visibility="hidden",e.style.opacity="0";else{const s=i?[0,1]:[1,0],r=!i,a=at({value:o,inputRange:s,easing:n,reverseEasing:r,outputRange:i?[.5,1]:[1,.5]});if(t){const t=at({value:o,inputRange:s,easing:G.ease,reverseEasing:r,outputRange:i?[0,1]:[1,0]});e.style.opacity=`${t}`}e.style.transform=`scale(${a})`,e.style.visibility=0===o?"hidden":"visible"}},move:({dx:t=0,dy:e=0,opacity:o=0}={})=>(i,{value:s,isOpen:n,usePan:r=!1,easing:a})=>{if(r)i.style.visibility="hidden",i.style.opacity="0";else{const r=n?[0,1]:[1,0],l=!n,c=at({value:s,inputRange:r,easing:G.ease,reverseEasing:l,outputRange:n?[o,1]:[1,o]}),h=t=>at({value:s,inputRange:r,easing:a,reverseEasing:l,outputRange:n?[t,0]:[0,t]});i.style.transform=`translate(${h("function"==typeof t?t(i):t)}px, ${h("function"==typeof e?e(i):e)}px)`,i.style.opacity=`${c}`,i.style.visibility=0===s?"hidden":"visible"}}},se=new Et({logger:!1,loggerCollapsed:!0});window.xoStore=se;class ne{constructor(t){o(this,"stateName"),o(this,"getTriggerElement",((t,e)=>null!=e?e:document.querySelector(`${zt.PopoverTrigger}[xo-name="${t}"]`))),o(this,"toggle",((t,e)=>{const o=this.getTriggerElement(t,e);se.set(this.stateName,(e=>{var i;return{...e,trigger:{...e.trigger,[this.stateName]:t},data:{...e.data,[t]:{...e.data[t],isOpen:!(null!=(i=e.data[t])&&i.isOpen),...null!=o?{triggerElement:o}:{}}}}}))(`${this.stateName}/toggle`)})),o(this,"open",((t,e)=>{const o=this.getTriggerElement(t,e);se.set(this.stateName,(e=>({...e,trigger:{...e.trigger,[this.stateName]:t},data:{...e.data,[t]:{...e.data[t],isOpen:!0,...null!=o?{triggerElement:o}:{}}}})))(`${this.stateName}/open`)})),o(this,"close",((t,e)=>{const o="empty"===e?e:this.getTriggerElement(t,e);se.set(this.stateName,(e=>({...e,trigger:{...e.trigger,[this.stateName]:t},data:{...e.data,[t]:{...e.data[t],isOpen:!1,...null!=o?{triggerElement:"empty"===o?null:o}:{}}}})))(`${this.stateName}/close`)})),o(this,"on",((t,e,o)=>se.subscribe(this.stateName,(({data:i})=>{null!=i[e]&&("open"===t&&i[e].isOpen||"close"===t&&!i[e].isOpen)&&o()})))),this.stateName=t}}const re="button, a, input, select, textarea, summary, details, label, [tabindex], [contenteditable], [role], [aria-label], [aria-labelledby], [aria-describedby]",ae=W();class le extends HTMLElement{constructor(){super(),o(this,"unsubscribe",null),o(this,"sectionEl",null),o(this,"initialized",!1),o(this,"prevIsOpen",!1),o(this,"allA11yEls",[]),o(this,"a11yEls",[]),o(this,"firstA11yEl",null),o(this,"lastA11yEl",null),o(this,"firstA11yIndex",null),o(this,"lastA11yIndex",null),o(this,"focusIndex",null),o(this,"toggleIndex",null),o(this,"listener",(()=>{var t;const{isOpen:e}=this.state;this.initialized&&e!==this.prevIsOpen&&(e?($(this,"xo-active",!0),this.componentOpen(),this.handleAutoFocus(),document.addEventListener("keydown",this.handleA11y),this.toggleIndex=this.focusIndex):($(this,"xo-active",!1),null!=this.toggleIndex&&(null==(t=this.allA11yEls[this.toggleIndex])||t.focus(),this.toggleIndex=null),this.componentClose(),document.removeEventListener("keydown",this.handleA11y)),this.prevIsOpen=e),this.initialized&&this.subscribe()})),o(this,"setState",(t=>se.set(this.stateName,(e=>{const o=e;return{...e,data:{...o.data,..."function"==typeof t?t(o.data):t}}})))),o(this,"setCssVariables",((t,e)=>{const{xoName:o}=this.options;I(this.componentName,"xo-name",o);let i="";const s=e||this.options;for(const e in s){const o=s[e];if(null!=o&&"object"!=typeof o){let s=ot.camelToKebab(e);s=s.includes("xo-")?s:`xo-${s}`,i+=`--${s}: ${o}${null!=t?" !important":""};`}}const{cssText:n}=ae` ${this.componentName}[xo-name="${o}"] { ${i} } `;!function(t,e){var o;const i=e.querySelector(".xo-styles");if(i)i.textContent&&(null==(o=i.textContent)||!o.includes(t))&&(i.textContent+=t);else{const o=document.createElement("style");o.classList.add("xo-styles"),o.textContent=t,e.appendChild(o)}}(null==t?n:`@media (max-width: ${t}px) { ${n} }`,document.head)})),o(this,"handleA11y",(t=>{const{isOpen:e}=this.state;this.allA11yEls=Array.from(document.querySelectorAll(re)),this.a11yEls=Array.from(this.querySelectorAll(re));const o=t.shiftKey,i="Tab"===t.key;if("Escape"===t.key&&e){const{xoName:t}=this.options;I(this.componentName,"xo-name",t),new ne(this.stateName).close(t)}if(this.a11yEls.length){if(this.firstA11yEl=this.a11yEls[0],this.lastA11yEl=this.a11yEls[this.a11yEls.length-1],this.firstA11yIndex=this.allA11yEls.indexOf(this.firstA11yEl),this.lastA11yIndex=this.allA11yEls.indexOf(this.lastA11yEl),i){const e=t.target,i=e.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:e;let s=this.allA11yEls.indexOf(i);o?s===this.firstA11yIndex&&(s=this.lastA11yIndex+1):s===this.lastA11yIndex&&(s=this.firstA11yIndex-1),q(this.allA11yEls,((t,e)=>{e===s?t.focus():t.blur()}))}}else{const{isOpen:e}=this.state;e&&t.preventDefault()}})),o(this,"handleAutoFocus",(async()=>{const{xoAutofocus:t=!1}=this.options;if("xo-modal"===this.componentName||"xo-popover"===this.componentName){const t=Number(this.getAttribute("xo-duration"))||300;await X(t)}if(this.focus(),t){const t=this.querySelector('input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="url"], input[type="search"], textarea');null==t||t.focus()}})),o(this,"handleShopifySectionSelect",(()=>{const{xoName:t}=this.options;new ne(this.stateName).open(t)})),o(this,"handleShopifySectionDeselect",(()=>{const{xoName:t}=this.options;new ne(this.stateName).close(t)})),o(this,"handleDesignMode",(()=>{var t,e,o;(null==(t=window.Shopify)?void 0:t.designMode)&&M(this,"xo-section-select")&&(null==(e=this.sectionEl)||e.addEventListener("shopify:section:select",this.handleShopifySectionSelect),null==(o=this.sectionEl)||o.addEventListener("shopify:section:deselect",this.handleShopifySectionDeselect))})),o(this,"handleFocusIn",(t=>{const e=Array.from(document.querySelectorAll(re));this.focusIndex=e.indexOf(t.target)})),o(this,"componentOpen",(()=>{})),o(this,"componentClose",(()=>{})),o(this,"componentMount",(()=>{})),o(this,"componentUnmount",(()=>{})),o(this,"subscribe",(()=>{})),o(this,"componentBeforeMount",(()=>{})),this.sectionEl=this.closest(".shopify-section")}get options(){return nt(this,{pick:["xoName","xoAutofocus","xoSectionSelect"],types:{xoName:"string",xoAutofocus:"boolean",xoSectionSelect:"boolean"}})}get state(){var t;const{xoName:e}=this.options;I(this.componentName,"xo-name",e);const o=se.get(this.stateName),i=null==(t=null==o?void 0:o.data)?void 0:t[e];return"object"!=typeof i&&null==i.isOpen?{}:i}async connectedCallback(){var t;this.componentBeforeMount();const{xoName:e}=this.options;I(this.componentName,"xo-name",e),$(this,"xo-content",!0),null==this.getAttribute("tabindex")&&(null==(t=this.parentElement)?void 0:t.tagName.toLowerCase())!==zt.GalleryPortal&&(this.tabIndex=0),document.addEventListener("focusin",this.handleFocusIn),se.set(this.stateName,(t=>{const o=t;return{...o,data:{...o.data,[e]:{isOpen:!1,...o.data[e]}}}}))(`${this.stateName}/mount`),this.unsubscribe=se.subscribe(this.stateName,this.listener,((t,o)=>e!==o.trigger[this.stateName])),await X(0),this.componentMount(),this.handleDesignMode(),this.initialized=!0}disconnectedCallback(){var t,e,o;null==(t=this.unsubscribe)||t.call(this),this.componentUnmount(),document.removeEventListener("keydown",this.handleA11y),document.removeEventListener("focusin",this.handleFocusIn),null==(e=this.sectionEl)||e.removeEventListener("shopify:section:select",this.handleShopifySectionSelect),null==(o=this.sectionEl)||o.removeEventListener("shopify:section:deselect",this.handleShopifySectionDeselect)}}class ce extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",null),o(this,"initialized",!1),o(this,"prevIsOpen",!1),o(this,"contentTarget",!1),o(this,"bindClick",(()=>{this.addEventListener("click",this.handleTrigger)})),o(this,"bindHover",(()=>{const{xoName:t}=this.options,e=document.querySelector(`[xo-content][xo-name="${t}"]`);this.addEventListener("mouseenter",this.handleMouseEnter),this.addEventListener("mouseleave",this.handleMouseLeave),e&&(e.addEventListener("mouseenter",this.handleMouseEnter),e.addEventListener("mouseleave",this.handleMouseLeave))})),o(this,"handleMouseEnter",(t=>{this.contains(t.target)||(this.contentTarget=!!t.target),this.state.isOpen||this.handleToggle("open")})),o(this,"handleMouseLeave",(async()=>{this.state.isOpen&&(await X(200),this.contentTarget||this.handleToggle("close"),this.contentTarget=!1)})),o(this,"handleTrigger",(()=>{this.handleToggle(this.actionType)})),o(this,"handleToggle",(t=>{const{xoName:e}=this.options;I(this.componentName,"xo-name",e);const o=new ne(this.stateName);"none"!==t&&o[t](e),this.componentTrigger()})),o(this,"listener",(()=>{const{isOpen:t}=this.state;this.initialized&&t!==this.prevIsOpen&&(t?($(this,"xo-active",!0),this.componentOpen()):($(this,"xo-active",!1),this.componentClose()),this.prevIsOpen=t)})),o(this,"setState",(t=>se.set(this.stateName,(e=>{const o=e;return{...e,data:{...o.data,..."function"==typeof t?t(o.data):t}}})))),o(this,"componentOpen",(()=>{})),o(this,"componentClose",(()=>{})),o(this,"componentMount",(()=>{})),o(this,"componentUnmount",(()=>{})),o(this,"componentTrigger",(()=>{})),o(this,"componentBeforeMount",(()=>{}))}async connectedCallback(){this.componentBeforeMount();const{xoName:t}=this.options;I(this.componentName,"xo-name",t),"click"===this.eventType?this.bindClick():"hover"===this.eventType&&(ct?this.bindClick():this.bindHover()),this.unsubscribe=se.subscribe(this.stateName,this.listener,((e,o)=>t!==o.trigger[this.stateName])),await X(0),this.componentMount(),this.initialized=!0}disconnectedCallback(){var t;this.removeEventListener("click",this.handleTrigger),ct||(this.removeEventListener("mouseenter",this.handleMouseEnter),this.removeEventListener("mouseleave",this.handleMouseLeave)),null==(t=this.unsubscribe)||t.call(this),this.componentUnmount()}get actionType(){return"toggle"}get eventType(){return"click"}get state(){var t;const{xoName:e}=this.options;I(this.componentName,"xo-name",e);const o=se.get(this.stateName),i=null==(t=null==o?void 0:o.data)?void 0:t[e];return"object"!=typeof i&&null==(null==i?void 0:i.isOpen)?{}:i}get options(){const t=nt(this,{pick:["xoName"],types:{xoName:"string"}}),e=this.closest("[xo-name]");return e?{...nt(e,{pick:["xoName"],types:{xoName:"string"}}),...t}:t}}window.xoAnimate=ie;const he=new ne("xo-toggle"),de=class extends le{constructor(){super(...arguments),o(this,"_options"),o(this,"parentEl",null),o(this,"setOptions",(()=>{var t;const e=nt(this,{pick:["xoName","xoAutofocus","xoOutsideClickEnabled","xoSectionSelect","xoPortal","xoParentSelector","xoBreakpoints"],types:{xoName:"string",xoAutofocus:"boolean",xoOutsideClickEnabled:"boolean",xoSectionSelect:"boolean",xoPortal:"boolean",xoParentSelector:"string",xoBreakpoints:"object"}}),o=Ct(null!=(t=e.xoBreakpoints)?t:{});this.options={...e,xoPortal:null!=(null==o?void 0:o.portal)?o.portal:e.xoPortal}})),o(this,"handleOutsideClick",(t=>{const{xoName:e,xoOutsideClickEnabled:o}=this.options,{isOpen:i}=this.state,s=t.target,n=document.querySelector(`${zt.ToggleTrigger}[xo-name="${e}"]`);i&&o&&!this.contains(s)&&(null==n||!n.contains(s))&&e&&he.close(e)})),o(this,"handleTopSelector",(async()=>{const{xoPortal:t}=this.options;if(t&&this.parentEl){const{width:t,height:e,top:o}=this.parentEl.getBoundingClientRect(),{left:i}=dt(this.parentEl);this.style.setProperty("--xo-top",`${o}px`),this.style.setProperty("--xo-left",`${i}px`),this.style.setProperty("--xo-width",`${t}px`),this.style.setProperty("--xo-height",`${e}px`),await X(500),this.handleTopSelector()}})),o(this,"handleScroll",(()=>{this.handleTopSelector()})),o(this,"handleResize",U(kt("x",(()=>{this.setOptions(),this.init()})),500)),o(this,"componentBeforeMount",(()=>{this.setOptions()})),o(this,"componentOpen",(async()=>{await X();const{xoParentSelector:t}=this.options;t&&(this.parentEl=document.querySelector(t)),this.handleTopSelector()})),o(this,"init",(()=>{const{xoPortal:t,xoName:e,xoParentSelector:o}=this.options;o&&(this.parentEl=document.querySelector(o)),t&&e&&o&&(this.setAttribute("popover",e),this.style.setProperty("--xo-right",`${St()}px`),Ot(this),this.handleTopSelector(),window.addEventListener("scroll",this.handleScroll)),t||(Nt(this),this.removeAttribute("popover"),this.style.removeProperty("--xo-top"),this.style.removeProperty("--xo-left"),this.style.removeProperty("--xo-right"),this.style.removeProperty("--xo-width"),this.style.removeProperty("--xo-height")),document.addEventListener("click",this.handleOutsideClick)})),o(this,"componentMount",(()=>{const{xoBreakpoints:t}=this.options;this.init(),t&&H(t).length>0&&window.addEventListener("resize",this.handleResize)})),o(this,"componentUnmount",(()=>{document.addEventListener("click",this.handleOutsideClick),window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("resize",this.handleResize),Nt(this)}))}static get observedAttributes(){return["xo-portal","xo-breakpoints"]}get options(){return{...de.defaultOptions,...this._options}}get stateName(){return"xo-toggle"}get componentName(){return zt.Toggle}set options(t){this._options=t}async attributeChangedCallback(t,e,o){e!==o&&(await X(100),this.setOptions(),this.init())}};let ue=de;o(ue,"defaultOptions",{xoName:null,xoOutsideClickEnabled:!1,xoPortal:!1,xoParentSelector:""}),se.create("xo-toggle",{initialState:{trigger:{},data:{}}});const pe=new ne("xo-toggle");window.xoToggle=pe,F({[zt.Toggle]:ue,[zt.ToggleTrigger]:class extends ce{get stateName(){return"xo-toggle"}get componentName(){return zt.ToggleTrigger}}});const me=(t=!1)=>(e,{value:o,isOpen:i,triggerEl:s,dy:n=0,modalEl:r,easing:a})=>{if(!s)return ie.zoom(t)(e,{value:o,isOpen:i,easing:a});const l=r.querySelector("img[xo-cropped]"),c=s.getBoundingClientRect(),h=i?[0,1]:[1,0],d=!i,u=c.width/e.offsetWidth,p=c.height/e.offsetHeight,m=c.left+c.width/2-r.scrollWidth/2,x=e.offsetHeight>r.offsetHeight?e.offsetHeight:r.offsetHeight,g=c.top+c.height/2-x/2+r.scrollTop,v=at({value:o,inputRange:h,easing:a,reverseEasing:d,outputRange:i?[u,1]:[1,u]}),b=at({value:o,inputRange:h,easing:a,reverseEasing:d,outputRange:i?[p,1]:[1,p]}),f=at({value:o,inputRange:h,easing:a,reverseEasing:d,outputRange:i?[m,0]:[0,m]}),y=at({value:o,inputRange:h,easing:a,reverseEasing:d,outputRange:i?[g,n]:[n,g]});if(t){const t=at({value:o,inputRange:h,easing:G.ease,reverseEasing:d,outputRange:i?[0,1]:[1,0]});e.style.opacity=`${t}`}e.style.transform=`translateX(${f}px) translateY(${y}px) scaleX(${v}) scaleY(${b})`,e.style.visibility=0===o?"hidden":"visible",l&&(l.style.transform=v>b?`scaleY(${v/b})`:`scaleX(${b/v})`)},xe={none:ie.none,zoom:ie.zoom(!0),"smart-zoom":me(),"smart-fade-zoom":me(!0),fade:ie.move(),"fade-up":ie.move({dy:100}),"fade-down":ie.move({dy:-100}),"fade-left":ie.move({dx:100}),"fade-right":ie.move({dx:-100}),"slide-up":ie.move({dy:t=>{const{offsetTop:e}=t;return window.innerHeight-e},opacity:1}),"slide-down":ie.move({dy:t=>{const{offsetTop:e,offsetHeight:o}=t;return-1*(o+e)},opacity:1}),"slide-left":ie.move({dx:t=>{const{offsetLeft:e}=t;return window.innerWidth-e},opacity:1}),"slide-right":ie.move({dx:t=>{const{offsetLeft:e,offsetWidth:o}=t;return-1*(o+e)},opacity:1})},ge=W(),ve=class extends le{constructor(){super(...arguments),o(this,"animated",z()),o(this,"cancel",(()=>{})),o(this,"shadow",this.attachShadow({mode:"open"})),o(this,"dialog",document.createElement("div")),o(this,"_options"),o(this,"setOptions",(()=>{var t;const e=nt(this,{pick:["xoName","xoDuration","xoEasing","xoAnimate","xoBackdropColor","xoBackdropBlur","xoBackdropDisabled","xoPortal","xoPlacement","xoDisabled","xoBreakpoints","xoAutofocus","xoSectionSelect","xoVideoAutoplay"],types:{xoName:"string",xoDuration:"number",xoEasing:"string",xoAnimate:"string",xoBackdropColor:"string",xoBackdropBlur:"number",xoBackdropDisabled:"boolean",xoPortal:"boolean",xoPlacement:"string",xoDisabled:"boolean",xoBreakpoints:"object",xoAutofocus:"boolean",xoSectionSelect:"boolean",xoVideoAutoplay:"boolean"}}),o=Ct(null!=(t=e.xoBreakpoints)?t:{});this.options=JSON.parse(JSON.stringify({...e,xoDisabled:null!=(null==o?void 0:o.disabled)?o.disabled:e.xoDisabled,xoDuration:null!=(null==o?void 0:o.duration)?o.duration:e.xoDuration,xoEasing:null!=(null==o?void 0:o.easing)?o.easing:e.xoEasing,xoAnimate:null!=(null==o?void 0:o.animate)?o.animate:e.xoAnimate,xoBackdropColor:null!=(null==o?void 0:o.backdropColor)?o.backdropColor:e.xoBackdropColor,xoBackdropBlur:null!=(null==o?void 0:o.backdropBlur)?o.backdropBlur:e.xoBackdropBlur,xoBackdropDisabled:null!=(null==o?void 0:o.backdropDisabled)?o.backdropDisabled:e.xoBackdropDisabled,xoPlacement:null!=(null==o?void 0:o.placement)?o.placement:e.xoPlacement}))})),o(this,"componentOpen",(()=>{const{xoDuration:t,xoVideoAutoplay:e}=this.options;if(Ot(this),function(){const t=St();document.body.style.setProperty("--scroll-bar-width",`${t}px`),document.body.classList.add("xo-modal-open")}(),this.cancel(),this.cancel=this.animated({from:0,to:1,duration:t}),e){const t=this.querySelector("video");null==t||t.play()}})),o(this,"componentClose",(()=>{const{xoDuration:t,xoVideoAutoplay:e}=this.options;if(function(){const{data:t}=se.get("xo-modal");ht(t).some((t=>t.isOpen))||(document.body.style.removeProperty("--scroll-bar-width"),document.body.classList.remove("xo-modal-open"))}(),this.cancel(),this.animated({from:1,to:0,duration:t,onEnd:()=>{Nt(this)}}),e){const t=this.querySelector("video");null==t||t.pause()}})),o(this,"setStyles",(t=>{const{xoAnimate:e,xoEasing:o}=this.options,{isOpen:i,triggerElement:s,dy:n,usePan:r=!1}=this.state,a=this.shadow.querySelector(zt.ModalContent),{cssText:l}=ge` ${zt.ModalContent} * { pointer-events: auto; } `,c=this.shadow.querySelector("style");0===t?(this.style.removeProperty("visibility"),this.style.removeProperty("opacity")):(this.style.visibility="visible",this.style.opacity="1"),1===t?(this.style.removeProperty("pointer-events"),c&&!c.innerText.includes(l)&&(c.innerText=c.innerText+l)):(this.style.pointerEvents="none",c&&(c.innerText=c.innerText.replace(l,""))),xe[e]&&xe[e](a,{value:t,isOpen:i,triggerEl:s,dy:n,modalEl:this,usePan:r,easing:G[o]})})),o(this,"render",(()=>{const{xoName:t,xoBackdropColor:e,xoBackdropBlur:o,xoBackdropDisabled:i,xoPlacement:s,xoDisabled:n}=this.options,{cssText:r}=((t,e)=>ge` ${zt.ModalBackdrop} { position: absolute; inset: 0; z-index: 1; background-color: ${t||"var(--xo-backdrop-color, rgba(0, 0, 0, 0.5))"}; backdrop-filter: blur(${e?`${e}px`:"var(--xo-backdrop-blur, 0px)"}); pointer-events: auto; } ${zt.ModalInner} { position: relative; display: flex; min-height: 100%; } ${zt.ModalInner}[xo-placement="center"] { align-items: center; justify-content: center; } ${zt.ModalInner}[xo-placement="top-center"] { justify-content: center; } ${zt.ModalInner}[xo-placement="top-right"] { justify-content: flex-end; } ${zt.ModalInner}[xo-placement="bottom-left"] { align-items: flex-end; } ${zt.ModalInner}[xo-placement="bottom-center"] { align-items: flex-end; justify-content: center; } ${zt.ModalInner}[xo-placement="bottom-right"] { align-items: flex-end; justify-content: flex-end; } ${zt.ModalContent} { position: relative; z-index: 9; display: block; visibility: hidden; width: fit-content; height: fit-content; pointer-events: none; } `)(e,o),a=i?"":`<${zt.ModalBackdrop} xo-name="${t}">`;return n?`\n <${zt.ModalInner} xo-placement="${s}">\n <${zt.ModalContent}>\n \n \n ${a}\n \n `:`\n \n <${zt.ModalInner} xo-placement="${s}">\n <${zt.ModalContent}>\n \n \n ${a}\n \n `})),o(this,"addSlotName",(t=>{const e=Array.from(this.querySelectorAll(zt.Modal));q(Array.from(this.children),(o=>{e.includes(o)||o.setAttribute("slot",`${t}-inner`)}))})),o(this,"setOptionsState",(t=>{this.setState((e=>({...e,[t]:{...e[t],options:this.options}})))})),o(this,"checkSmartAnimateSupport",(()=>{const{xoAnimate:t,xoPlacement:e}=this.options;t.includes("smart-")&&"center"!==e&&L(`[${zt.Modal}] xo-placement="${e}" is not supported with xo-animate="${t}"`)})),o(this,"handleImageCropped",(()=>{const t=this.querySelector("img[xo-cropped]");t&&(t.naturalWidth/t.naturalHeight>window.innerWidth/window.innerHeight?(t.style.width="100vw",t.style.height="auto"):(t.style.width="auto",t.style.height="100vh",t.style.maxWidth="none"))})),o(this,"componentBeforeMount",(()=>{this.setOptions()})),o(this,"handleResize",U(kt("x",(()=>{const{xoName:t}=this.options;this.setOptions(),this.animated.off(),Ae.close(t),this.mounted()})),500)),o(this,"setCurrentDisabled",(()=>{const{xoDisabled:t}=this.options;$(this,"xo-current-disabled",t)})),o(this,"handleDialogCancel",(t=>{t.preventDefault()})),o(this,"mounted",(()=>{const{xoName:t,xoDisabled:e,xoBreakpoints:o,xoPortal:i}=this.options;I(this.componentName,"xo-name",t),this.addSlotName(t),this.setCurrentDisabled(),i&&It()&&this.setAttribute("popover",t),this.shadow.innerHTML=this.render(),this.setCssVariables(),o&&H(o).length>0&&q(H(o).sort(),(t=>{const e=o[t];this.setCssVariables(Number(t),e)})),e||(this.setOptionsState(t),this.checkSmartAnimateSupport(),this.animated.onUpdate(this.setStyles),this.handleImageCropped())})),o(this,"componentMount",(()=>{const{xoBreakpoints:t}=this.options;this.mounted(),t&&H(t).length>0&&window.addEventListener("resize",this.handleResize)})),o(this,"componentUnmount",(()=>{this.animated.off(),window.removeEventListener("resize",this.handleResize),this.dialog.removeEventListener("cancel",this.handleDialogCancel)})),o(this,"handleClose",(()=>{const{xoName:t}=this.options;I(this.componentName,"xo-name",t),this.setState((e=>({...e,[t]:{...e[t],triggerElement:e[t].triggerElement,usePan:!1,isOpen:!1}})))}))}get stateName(){return"xo-modal"}get componentName(){return zt.Modal}get options(){var t,e,o,i;const{xoPlacement:s}=this._options,n=s&&"center"!==s?{xoDuration:null!=(e=null==(t=window.settings)?void 0:t.drawer_duration)?e:300,xoEasing:null!=(i=null==(o=window.settings)?void 0:o.drawer_easing)?i:"decay",xoAnimate:"smart-fade-zoom"}:{},r={...ve.defaultOptions,...n,...this._options};return{...r,xoDuration:"none"===r.xoAnimate?0:r.xoDuration}}set options(t){this._options=t}static get observedAttributes(){return["xo-observed"]}getShadow(){return this.shadow}async attributeChangedCallback(t,e,o){"xo-observed"===t&&null!=e&&e!==o&&(await X(100),this.setOptions(),this.componentUnmount(),this.componentMount(),this.handleClose(),q(Array.from(document.querySelectorAll(`${zt.ModalTrigger}[xo-name="${this.options.xoName}"]`)),(t=>{t.setAttribute("xo-observed",o)})))}};let be=ve;o(be,"defaultOptions",{xoName:null,xoDuration:null!=(n=null==(s=window.settings)?void 0:s.modal_duration)?n:300,xoEasing:null!=(a=null==(r=window.settings)?void 0:r.modal_easing)?a:"decay",xoAnimate:null!=(c=null==(l=window.settings)?void 0:l.modal_animate)?c:"smart-fade-zoom",xoBackdropDisabled:!1,xoPortal:It(),xoPlacement:"center",xoDisabled:!1,xoBreakpoints:{},xoScrollDisabled:!1,xoAutofocus:!1,xoVideoAutoplay:!1});const fe=1e3/60,ye=class extends ce{constructor(){super(...arguments),o(this,"timeId",-1),o(this,"timeId2",-1),o(this,"_options"),o(this,"setOptions",(()=>{this.options=nt(this,{pick:["xoName","xoSync"],types:{xoName:"string",xoSync:"boolean"}})})),o(this,"setTriggerElement",(()=>{const{xoName:t}=this.options,{isOpen:e}=this.state;I(this.componentName,"xo-name",t),this.setState((o=>{var i;return{...o,[t]:{...o[t],triggerElement:e?this:null==(i=o[t])?void 0:i.triggerElement,usePan:!1}}}))})),o(this,"componentTrigger",(()=>{const{isOpen:t}=this.state,{xoSync:e}=this.options;this.setTriggerElement(),e&&t&&(this.timeId2=window.setTimeout((()=>{this.style.visibility="hidden",clearTimeout(this.timeId2)}),fe))})),o(this,"componentBeforeMount",(()=>{this.setOptions()})),o(this,"componentMount",(()=>{this.setTriggerElement()})),o(this,"componentUnmount",(()=>{clearTimeout(this.timeId),clearTimeout(this.timeId2)})),o(this,"componentClose",(()=>{const{xoSync:t}=this.options;if(t){const{options:t}=this.state,{xoDuration:e}=t;this.timeId=window.setTimeout((()=>{this.style.visibility="visible",clearTimeout(this.timeId)}),e-fe)}}))}get stateName(){return"xo-modal"}get componentName(){return zt.ModalTrigger}get options(){const t=this.closest("[xo-name]");if(t){const e=nt(t,{pick:["xoName"],types:{xoName:"string"}});return{...ye.defaultOptions,...e,...this._options}}return{...ye.defaultOptions,...this._options}}set options(t){this._options=t}static get observedAttributes(){return["xo-observed"]}async attributeChangedCallback(t,e,o){"xo-observed"===t&&null!=e&&e!==o&&(await X(100),this.setOptions())}};let Ee=ye;o(Ee,"defaultOptions",{xoName:null,xoSync:!1});const we="idle",Se="target",Ce=class extends ce{constructor(){super(...arguments),o(this,"animated",z()),o(this,"panAnimated",z()),o(this,"panCloseAnimated",z()),o(this,"cancel",(()=>{})),o(this,"modalEl",null),o(this,"backdropEl",null),o(this,"contentEl",null),o(this,"distance",0),o(this,"opacity",1),o(this,"timeId",-1),o(this,"pan",null),o(this,"axis",we),o(this,"componentOpen",(()=>{const{options:t}=this.state,{xoDuration:e}=t;this.cancel(),this.cancel=this.animated({from:0,to:1,duration:e})})),o(this,"componentClose",(()=>{const{options:t}=this.state,{xoDuration:e}=t;this.cancel(),this.cancel=this.animated({from:1,to:0,duration:e})})),o(this,"componentUnmount",(()=>{clearTimeout(this.timeId),this.pan&&this.pan.destroy(),this.animated.off(),this.panAnimated.off(),this.panCloseAnimated.off()})),o(this,"resetModalMeasure",(()=>{const{xoName:t}=this.options;I(this.componentName,"xo-name",t),this.setState((e=>({...e,[t]:{...e[t],dy:0,opacity:1}})))(`${this.stateName}/resetModalContentMeasure`)})),o(this,"componentMount",(()=>{const{xoName:t,xoVertical:e,xoThreshold:o,xoIntentionalAxis:i}=this.options,{options:s}=this.state,{xoEasing:n,xoAnimate:r}=s,a=new ne(this.stateName);I(this.componentName,"xo-name",t),this.pan=pt({element:this,onMove:({dx:t,dy:s})=>{var n,a,l,c,h,d,u;const p=this.querySelector(zt.ImageZoomItem);if(!(Number(null!=(n=null==p?void 0:p.getAttribute("xo-zoom"))?n:"1")>1))if(this.modalEl=this.closest(zt.Modal),this.backdropEl=null==(c=null==(l=null==(a=this.modalEl)?void 0:a.shadowRoot)?void 0:l.querySelector)?void 0:c.call(l,zt.ModalBackdrop),this.contentEl=null==(u=null==(d=null==(h=this.modalEl)?void 0:h.shadowRoot)?void 0:d.querySelector)?void 0:u.call(d,zt.ModalContent),this.axis===we&&(Math.abs(e?t:s)/o>=Math.abs(e?s:t)?this.axis=Se:this.axis="lock"),this.axis!==Se&&i)this.pan&&this.pan.setValue({dx:0,dy:0});else{this.style.touchAction="none";const o=(e?window.innerWidth-this.offsetWidth:window.innerHeight-this.offsetHeight)/2,i=(e?this.offsetWidth:this.offsetHeight)+o;this.backdropEl&&(this.opacity=at({value:e?t:s,inputRange:[-i,0,i],outputRange:[0,1,0]}),this.backdropEl.style.opacity=`${this.opacity}`),this.contentEl&&(r.includes("smart-"),this.contentEl.style.transform=e?`translateX(${t}px)`:`translateY(${s}px)`)}},onEnd:({dx:o,dy:s,vx:n,vy:r})=>{var l;const c=this.querySelector(zt.ImageZoomItem);if(Number(null!=(l=null==c?void 0:c.getAttribute("xo-zoom"))?l:"1")>1)return;const{options:h}=this.state,{xoDuration:d,xoAnimate:u}=h;if((this.axis===Se||!i)&&(this.style.pointerEvents="none",this.distance=e?o:s,this.contentEl)){let o=(e?window.innerWidth:window.innerHeight)/3;i&&(o=(e?this.contentEl.offsetWidth:this.contentEl.offsetHeight)/2);const l=Math.abs(this.distance)>o||Math.abs(e?n:r)>8;this.setState((e=>({...e,[t]:{...e[t],dy:s,opacity:this.opacity}})))(`${this.stateName}/setModalContentMeasure`),l?u.includes("smart-")?a.close(t):this.panCloseAnimated({from:0,to:1,duration:300}):this.panAnimated({from:0,to:1,duration:300}),this.pan&&this.pan.setValue({dx:0,dy:0}),this.timeId=window.setTimeout((()=>{this.resetModalMeasure(),clearTimeout(this.timeId),this.style.removeProperty("pointer-events")}),d)}this.style.removeProperty("touch-action"),this.axis=we}}),this.panAnimated.onUpdate((t=>{if(this.backdropEl){const e=at({value:t,inputRange:[0,1],outputRange:[this.opacity,1]});this.backdropEl.style.opacity=`${e}`}if(this.contentEl){const o=at({value:t,inputRange:[0,1],outputRange:[this.distance,0],easing:G[n]});this.contentEl.style.transform=e?`translateX(${o}px) translateY(0px) scale(1)`:`translateX(0px) translateY(${o}px) scale(1)`}})),this.panCloseAnimated.onUpdate((t=>{if(this.backdropEl){const e=at({value:t,inputRange:[0,1],outputRange:[this.opacity,0]});this.backdropEl.style.opacity=`${e}`}if(this.contentEl){const{offsetTop:o,offsetLeft:i,offsetWidth:s,offsetHeight:r}=this.contentEl;let a=-1*(e?s+i:r+o);this.distance>=0&&(a=e?window.innerWidth-i:window.innerHeight-o);const l=at({value:t,inputRange:[0,1],outputRange:[this.distance,a],easing:G[n]});this.contentEl.style.transform=e?`translateX(${l}px) translateY(0px) scale(1)`:`translateX(0px) translateY(${l}px) scale(1)`}})),this.panCloseAnimated.onEnd((()=>{this.setState((e=>({...e,[t]:{...e[t],usePan:!0}}))),a.close(t)}))}))}get stateName(){return"xo-modal"}get componentName(){return zt.ModalPan}get actionType(){return"none"}get options(){const t=nt(this,{pick:["xoName","xoVertical","xoThreshold","xoIntentionalAxis"],types:{xoName:"string",xoVertical:"boolean",xoThreshold:"number",xoIntentionalAxis:"boolean"}}),e=this.closest("[xo-name]");if(e){const o=nt(e,{pick:["xoName"],types:{xoName:"string"}});return{...Ce.defaultOptions,...o,...t}}return{...Ce.defaultOptions,...t}}};let ke=Ce;o(ke,"defaultOptions",{xoName:null,xoVertical:!1,xoThreshold:1.5,xoIntentionalAxis:!1}),se.create("xo-modal",{initialState:{trigger:{},data:{}}});const Ae=new ne("xo-modal");window.xoModal=Ae,F({[zt.Modal]:be,[zt.ModalTrigger]:Ee,[zt.ModalBackdrop]:class extends ce{constructor(){super(...arguments),o(this,"animated",z()),o(this,"cancel",(()=>{})),o(this,"componentOpen",(()=>{const{options:t}=this.state,{xoDuration:e}=t;this.cancel(),this.cancel=this.animated({from:0,to:1,duration:e,easing:G.decay})})),o(this,"componentClose",(()=>{const{options:t,opacity:e=1,usePan:o=!1}=this.state,{xoDuration:i}=t;this.cancel(),this.cancel=this.animated({from:e,to:0,duration:o?0:i,easing:G.decay})})),o(this,"componentMount",(()=>{const{options:t}=this.state,{xoAnimate:e}=t;this.style.visibility="hidden",this.animated.onUpdate((t=>{"none"!==e&&(this.style.opacity=`${t}`),this.style.visibility=0===t?"hidden":"visible"}))})),o(this,"componentUnmount",(()=>{this.animated.off()}))}get stateName(){return"xo-modal"}get componentName(){return zt.ModalBackdrop}get actionType(){return"close"}},[zt.ModalPan]:ke});const Pe=W()` ${zt.ScrollXInner} { display: block; position: sticky; top: 0; left: 0; width: 100%; height: 100vh; } `;class Te extends HTMLElement{constructor(){super(),o(this,"shadow"),o(this,"instance"),o(this,"elementStyle",(t=>{this.style.height=100*t+"vh",this.shadow.innerHTML=`\n \n <${zt.ScrollXInner}>\n `})),o(this,"handleChild",((t,e)=>{if(t.tagName.toLowerCase()===zt.ScrollXItem&&e>0){const o=dt(this).top;this.instance.add(t,{from:()=>o-2*window.innerHeight+window.innerHeight*(e+1),to:()=>o-window.innerHeight+window.innerHeight*(e+1),keyframes:{"0%":{width:"0%"},"100%":{width:"100%"}}})}})),this.shadow=this.attachShadow({mode:"open"}),this.instance=te({setStyles({element:t,createValue:e}){const o=e("width");t.style.width=`${o}`}})}connectedCallback(){const t=Array.from(this.children);this.elementStyle(t.length),q(t,this.handleChild),this.instance.run()}}F({[zt.ScrollX]:Te});const Me={set(t,e){se.set("xo-circle-bar",(o=>({...o,[t]:e})))},animate(t,{value:e,duration:o=1e3,easing:i}){const s=z();return s({from:0,to:e,duration:o,easing:i?G[i]:void 0,onUpdate(e){se.set("xo-circle-bar",(o=>({...o,[t]:e})))}}),s.off}},$e={},Le=new IntersectionObserver((t=>{const e=requestAnimationFrame((()=>{t.forEach((async t=>{const o=t.target,{xoDuration:i,xoName:s,xoEasing:n,xoValue:r}=o.getOptions();if(t.isIntersecting&&s&&r){const t=$e[s];null==t||t();const a=Me.animate(s,{value:r,duration:i,easing:n});$e[s]=a,cancelAnimationFrame(e),Le.unobserve(o)}}))}))}),{rootMargin:"0px 0px -50px 0px"}),Ie=class extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",null),o(this,"getOptions",(()=>{const t=nt(this,{pick:["xoName","xoFill","xoStrokeWidth","xoSize","xoTrackColor","xoThumbColor","xoStrokeLinecap","xoAnimateOnScroll","xoEasing","xoValue","xoDuration"],types:{xoName:"string",xoFill:"string",xoStrokeWidth:"number",xoSize:"number",xoTrackColor:"string",xoThumbColor:"string",xoStrokeLinecap:"string",xoAnimateOnScroll:"boolean",xoEasing:"string",xoValue:"number",xoDuration:"number"}});return{...Ie.defaultOptions,...t}})),o(this,"listener",(()=>{var t;const{xoName:e,xoSize:o,xoStrokeWidth:i}=this.getOptions();this.closest(zt.Carousel)||I(zt.CircleBar,"xo-name",e);const s=this.querySelector(".circle-bar-thumb"),n=null==(t=se.get("xo-circle-bar"))?void 0:t[e];if(null!=n){const t=at({value:n,inputRange:[0,100],outputRange:[o*Math.PI,i*Math.PI]});s.style.strokeDashoffset=`${t}`}})),o(this,"render",(()=>{const{xoSize:t,xoStrokeWidth:e,xoTrackColor:o,xoThumbColor:i,xoStrokeLinecap:s,xoFill:n}=this.getOptions();return`\n \n \n \n \n \n \n `}))}static get observedAttributes(){return["xo-observed"]}connectedCallback(){const t=this.getOptions();this.innerHTML=this.render(),this.style.display="block",t.xoAnimateOnScroll&&Le.observe(this),this.unsubscribe=se.subscribe("xo-circle-bar",this.listener)}async attributeChangedCallback(t,e,o){"xo-observed"===t&&e!==o&&(await X(100),this.disconnectedCallback(),this.connectedCallback())}disconnectedCallback(){var t;null==(t=this.unsubscribe)||t.call(this),Le.unobserve(this)}};let Oe=Ie;o(Oe,"defaultOptions",{xoName:null,xoFill:"transparent",xoSize:100,xoStrokeWidth:2,xoTrackColor:"#ebebeb",xoThumbColor:"#ea5b5b",xoStrokeLinecap:"round",xoAnimateOnScroll:!1,xoEasing:"ease",xoValue:0,xoDuration:1e3}),se.create("xo-circle-bar",{initialState:{}}),window.xoCircleBar=Me,F({[zt.CircleBar]:Oe});const Ne=new V,De=class{constructor(){o(this,"placements",["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]),o(this,"frames",{}),o(this,"elements",{}),o(this,"getOptions",(t=>"string"==typeof t?{...De.defaultOptions,content:t}:{...De.defaultOptions,...t})),o(this,"handleFrame",(t=>{var e;const o=this.elements[t];""===(null==o?void 0:o.innerHTML.trim())&&(o.removeAttribute("popover"),Nt(o),null==(e=this.frames[t])||e.remove(this.handleFrames[t]),o.remove())})),o(this,"handleFrames",{"top-left":()=>{this.handleFrame("top-left")},"top-center":()=>{this.handleFrame("top-center")},"top-right":()=>{this.handleFrame("top-right")},"bottom-left":()=>{this.handleFrame("bottom-left")},"bottom-center":()=>{this.handleFrame("bottom-center")},"bottom-right":()=>{this.handleFrame("bottom-right")}}),o(this,"createToastRoot",(t=>{this.elements[t]=document.querySelector(`${zt.ToastPortal}[xo-placement="${t}"]`),this.elements[t]||(this.elements[t]=document.createElement(zt.ToastPortal),this.elements[t].setAttribute("xo-placement",t),this.elements[t].setAttribute("popover","true"),document.body.appendChild(this.elements[t]),Ot(this.elements[t]),this.frames[t]=J.add(this.handleFrames[t],!0))})),o(this,"action",(t=>{const e=this.getOptions(t);for(const t of this.placements)this.createToastRoot(t);Ne.emit("toast:action",e)}))}};let qe=De;o(qe,"defaultOptions",{name:"",content:"",duration:200,delay:2e3,className:"",style:{},placement:"bottom-center",easing:"decay",closeButtonDisabled:!1,closeButtonClassName:"",closeButtonPlacement:"top-right",onShow(){},onHide(){}});const He=(new qe).action;class Fe extends HTMLElement{constructor(){super(...arguments),o(this,"offId",-1),o(this,"renderCloseButton",(t=>`\n <${zt.ToastCloseButton} class="${t.closeButtonClassName}" xo-placement="${t.closeButtonPlacement}">\n `)),o(this,"listener",(t=>{if(t.name){const e=document.querySelector(`${zt.Toast}[xo-name="${t.name}"]`);if(e.parentNode!==this){const o=nt(e,{pick:["xoDuration","xoClassName","xoDelay","xoEasing","xoPlacement","xoCloseButtonClassName","xoCloseButtonDisabled","xoCloseButtonPlacement"],types:{xoDuration:"number",xoClassName:"string",xoDelay:"number",xoEasing:"string",xoPlacement:"string",xoCloseButtonClassName:"string",xoCloseButtonDisabled:"boolean",xoCloseButtonPlacement:"string"},propTransformer:t=>ot.pascalToCamel(t.replace(/^xo/,""))}),i={...t,...o};if(i.placement===this.getAttribute("xo-placement")){const t=document.createElement(zt.ToastPlaceholder);t.setAttribute("xo-name",i.name),i.closeButtonDisabled||e.insertAdjacentHTML("beforeend",this.renderCloseButton(i)),e.message=i,e.after(t),i.placement.includes("top-")?this.insertAdjacentElement("beforeend",e):this.insertAdjacentElement("afterbegin",e)}}}else if(t.placement===this.getAttribute("xo-placement")){const e=document.createElement(zt.Toast);t.closeButtonDisabled?e.innerHTML=t.content:e.innerHTML=t.content+this.renderCloseButton(t),e.message=t,t.placement.includes("top-")?this.insertAdjacentElement("beforeend",e):this.insertAdjacentElement("afterbegin",e)}}))}connectedCallback(){this.offId=Ne.on("toast:action",this.listener)}disconnectedCallback(){Ne.off(this.offId)}}class Re extends HTMLElement{constructor(){super(...arguments),o(this,"timeId",-1),o(this,"animatedIn",z()),o(this,"animatedOut",z()),o(this,"message",null),o(this,"prevTimestamp",null),o(this,"delayFromMouseEnter",0),o(this,"closeEl",null),o(this,"unmounted",!1),o(this,"destroy",(()=>{clearTimeout(this.timeId),this.animatedIn.off(),this.animatedOut.off(),this.removeEventListener("mouseenter",this.handleMouseEnter),this.removeEventListener("mouseleave",this.handleMouseLeave),this.closeEl&&this.closeEl.removeEventListener("click",this.handleCloseClick)})),o(this,"getHeight",(()=>{var t,e;const{placement:o}=this.message,{marginTop:i,marginBottom:s}=window.getComputedStyle(this),n=null!=(t=parseInt(i))?t:0,r=null!=(e=parseInt(s))?e:0;return o.includes("top-")?this.offsetHeight+r:this.offsetHeight+n})),o(this,"getValueY",(t=>{const{placement:e}=this.message;return(e.includes("top-")?-1:1)*(t+20)})),o(this,"handleMouseEnter",(()=>{this.delayFromMouseEnter=Math.max(0,this.delayFromMouseEnter-(Date.now()-this.prevTimestamp)),clearTimeout(this.timeId)})),o(this,"handleMouseLeave",(()=>{this.timeId=window.setTimeout((()=>{this.unmount()}),this.delayFromMouseEnter),this.prevTimestamp=Date.now()})),o(this,"handleCloseClick",(()=>{this.unmount()})),o(this,"setStyles",(()=>{var t,e;const{closeButtonPlacement:o}=this.message,{className:i,style:s}=this.message;if(i&&(this.className=i),Object.assign(this.style,s),this.closeEl){const i=this.closeEl.offsetWidth+(null!=(t=parseInt(window.getComputedStyle(this.closeEl).marginRight))?t:0)+(null!=(e=parseInt(window.getComputedStyle(this.closeEl).marginLeft))?e:0);o.includes("left")?this.style.paddingLeft=`${i}px`:this.style.paddingRight=`${i}px`}})),o(this,"setCssVariables",(()=>{for(const t in this.message){const e=this.message[t];null!=e&&!/onShow|onHide|className|closeButtonClassName|style|content/g.test(t)&&this.style.setProperty(`--xo-${ot.camelToKebab(t)}`,` ${JSON.stringify(e)}`)}})),o(this,"mount",(()=>{const{duration:t,onShow:e,easing:o}=this.message,i=this.getHeight(),s=this.getValueY(i);this.closeEl=this.querySelector(zt.ToastCloseButton),this.prevTimestamp=Date.now(),e(this),this.setStyles(),this.setCssVariables(),this.closeEl&&this.closeEl.addEventListener("click",this.handleCloseClick),this.addEventListener("mouseenter",this.handleMouseEnter),this.addEventListener("mouseleave",this.handleMouseLeave),this.animatedIn({from:s,to:0,duration:t,easing:G[o],onUpdate:t=>{this.style.transform=`translateY(${t}px)`}}),this.unmounted=!1})),o(this,"unmount",(()=>{const{duration:t,placement:e,onHide:o,easing:i,name:s}=this.message,n=this.getHeight();this.unmounted||(this.unmounted=!0,this.style.pointerEvents="none",this.animatedOut({from:0,to:1,duration:t,onUpdate:t=>{const o=at({value:t,inputRange:[0,1],outputRange:[0,-n],easing:G[i]}),s=at({value:t,inputRange:[0,1],outputRange:[0,20],easing:G[i]});e.includes("top-")?(this.style.marginTop=`${o}px`,this.style.transform=`translateY(-${s}px)`):(this.style.marginBottom=`${o}px`,this.style.transform=`translateY(${s}px)`)},onEnd:()=>{if(this.style.removeProperty("pointer-events"),s){const t=document.querySelector(`${zt.ToastPlaceholder}[xo-name="${s}"]`),e=this.querySelector(zt.ToastCloseButton);t&&(this.style.removeProperty("margin-top"),this.style.removeProperty("margin-bottom"),this.style.removeProperty("transform"),t.after(this),t.remove(),null==e||e.remove(),this.destroy())}else this.remove();o(this)}}))}))}connectedCallback(){if(this.message){const{delay:t}=this.message;this.delayFromMouseEnter=t,this.mount(),this.timeId=window.setTimeout((()=>{this.unmount()}),t)}}disconnectedCallback(){this.destroy()}}window.xoToast=He,F({[zt.ToastPortal]:Fe,[zt.Toast]:Re});const Ve=new ne("xo-popover"),ze={none:ie.none,zoom:ie.zoom(!0),fade:ie.move(),"fade-up":ie.move({dy:50}),"fade-down":ie.move({dy:-50}),"fade-left":ie.move({dx:50}),"fade-right":ie.move({dx:-50})};function _e(t){const e=t.closest(zt.Modal),o=t.closest(zt.Sticky);return"function"==typeof HTMLDialogElement&&!e&&!o}const Be=class extends le{constructor(){super(...arguments),o(this,"animated",z()),o(this,"canClose",!1),o(this,"_options"),o(this,"setOptions",(()=>{var t;const e=nt(this,{pick:["xoName","xoAnimate","xoEasing","xoDuration","xoPlacement","xoPortal","xoDisabled","xoBreakpoints","xoAutofocus","xoSectionSelect","xoModalScrollSelector","xoOffset"],types:{xoName:"string",xoAnimate:"string",xoEasing:"string",xoDuration:"number",xoPlacement:"string",xoPortal:"boolean",xoDisabled:"boolean",xoBreakpoints:"object",xoAutofocus:"boolean",xoSectionSelect:"boolean",xoModalScrollSelector:"string",xoOffset:"number"}}),o=Ct(null!=(t=e.xoBreakpoints)?t:{});this.options=JSON.parse(JSON.stringify({...e,xoDisabled:null!=(null==o?void 0:o.disabled)?o.disabled:e.xoDisabled,xoDuration:null!=(null==o?void 0:o.duration)?o.duration:e.xoDuration,xoEasing:null!=(null==o?void 0:o.easing)?o.easing:e.xoEasing,xoAnimate:null!=(null==o?void 0:o.animate)?o.animate:e.xoAnimate,xoPlacement:null!=(null==o?void 0:o.placement)?o.placement:e.xoPlacement,xoOffset:null!=(null==o?void 0:o.offset)?o.offset:e.xoOffset}))})),o(this,"handleCalTopLeft",(()=>{var t,e;const{xoPlacement:o,xoOffset:i,xoModalScrollSelector:s}=this.options,{triggerElement:n}=this.state;if(n){const r=xt(n,{placement:o,offset:i,element:this}),a=this.closest(zt.Modal),l=this.closest(`${zt.Sticky}:not([xo-disabled])`);if(a){const e=null==(t=a.shadowRoot)?void 0:t.querySelector(zt.ModalContent),o=(s?a.querySelector(s):null)||e,{left:i,top:n}=dt(o),{x:l,y:c}=this.getValueWithBoundary(r.left-i,r.top-n);this.style.top=`${c}px`,this.style.left=`${l}px`}else if(l){const t=null==(e=l.shadowRoot)?void 0:e.querySelector(zt.StickyContent),{left:o,top:i}=dt(t),{x:s,y:n}=this.getValueWithBoundary(r.left-o,r.top-i);this.style.top=`${n}px`,this.style.left=`${s}px`}else{const{x:t,y:e}=this.getValueWithBoundary(r.left,r.top-window.scrollY);this.style.top=`${e}px`,this.style.left=`${t}px`}this.style.setProperty("--xo-popover-trigger-width",`${n.offsetWidth}px`)}})),o(this,"handleScroll",(()=>{this.handleCalTopLeft()})),o(this,"subscribe",(()=>{const{xoDuration:t,xoDisabled:e}=this.options,{triggerElement:o,isOpen:i}=this.state;e||(this.handleCalTopLeft(),o&&this.animated({from:i?0:1,to:i?1:0,duration:t}))})),o(this,"handleClose",(()=>{const{xoDuration:t,xoName:e}=this.options;this.animated({from:1,to:0,duration:t}),e&&Ve.close(e,"empty")})),o(this,"handleOutsideClick",(t=>{const{xoDisabled:e}=this.options,{isOpen:o,triggerElement:i}=this.state,s=t.target;this.canClose&&o&&!e&&!this.contains(s)&&(null==i||!i.contains(s))&&this.handleClose()})),o(this,"resetStyles",(()=>{const{xoDisabled:t}=this.options;t&&(this.style.removeProperty("top"),this.style.removeProperty("left"),this.style.removeProperty("opacity"),this.style.removeProperty("visibility"),this.style.removeProperty("transform"))})),o(this,"handleResize",U((()=>{this.setOptions(),this.resetStyles(),this.handleCalTopLeft(),this.componentUnmount(),this.componentMount()}),500)),o(this,"setCurrentDisabled",(()=>{const{xoDisabled:t}=this.options;$(this,"xo-current-disabled",t)})),o(this,"componentOpen",(()=>{const{xoPortal:t}=this.options;t&&_e(this)&&Ot(this)})),o(this,"componentClose",(()=>{const{xoDuration:t}=this.options;this.animated.getValue()>0&&this.animated.getValue()<1&&(this.animated({from:1,to:0,duration:t}),this.style.removeProperty("pointer-events"))})),o(this,"componentBeforeMount",(()=>{this.setOptions()})),o(this,"componentMount",(async()=>{const{xoName:t,xoAnimate:e,xoEasing:o,xoPortal:i,xoBreakpoints:s,xoModalScrollSelector:n}=this.options;I(this.componentName,"xo-name",t),i&&_e(this)&&this.setAttribute("popover",t),this.setCurrentDisabled(),this.setCssVariables(),s&&q(H(s).sort(),(t=>{const e=s[t];this.setCssVariables(Number(t),e)}));const r=this.closest(zt.Modal),a=this.closest(zt.Sticky);this.style.position=r||a?"absolute":"fixed",document.addEventListener("click",this.handleOutsideClick),this.animated.onUpdate((t=>{const{isOpen:i}=this.state;(i?1===t:0===t)?this.style.removeProperty("pointer-events"):this.style.pointerEvents="none",ze[e]&&ze[e](this,{isOpen:i,easing:G[o],value:t}),this.canClose=1===t})),this.animated.onEnd((()=>{const{isOpen:t}=this.state;!t&&i&&_e(this)&&Nt(this)})),window.addEventListener("resize",this.handleResize),r?(n&&r.querySelector(n)||window).addEventListener("scroll",this.handleScroll):window.addEventListener("scroll",this.handleScroll)})),o(this,"componentUnmount",(()=>{const{xoModalScrollSelector:t}=this.options;this.animated.off(),document.removeEventListener("click",this.handleOutsideClick),window.removeEventListener("resize",this.handleResize);const e=this.closest(zt.Modal);e?(t&&e.querySelector(t)||window).removeEventListener("scroll",this.handleScroll):window.removeEventListener("scroll",this.handleScroll)}))}static get observedAttributes(){return["xo-placement","xo-offset","xo-breakpoints"]}get stateName(){return"xo-popover"}get componentName(){return zt.Popover}get options(){return{...Be.defaultOptions,...this._options}}set options(t){this._options=t}getValueWithBoundary(t,e){const o=this.closest("[xo-popover-boundary]");if(o){const{left:i,top:s}=o.getBoundingClientRect();return{x:O(t,i,i+o.offsetWidth-this.offsetWidth),y:O(e,s,s+o.offsetHeight-this.offsetHeight)}}return{x:t,y:e}}async attributeChangedCallback(t,e,o){e!==o&&(await X(100),this.setOptions(),this.resetStyles(),this.handleCalTopLeft())}};let We=Be;o(We,"defaultOptions",{xoName:null,xoAnimate:"fade-up",xoEasing:"decay",xoDuration:300,xoPlacement:"bottom-center",xoPortal:!1,xoOffset:10,xoDisabled:!1,xoBreakpoints:{},xoAutofocus:!1});const Ue=class extends ce{constructor(){super(...arguments),o(this,"componentTrigger",(()=>{const{xoName:t,xoType:e}=this.options,{isOpen:o}=this.state;I(this.componentName,"xo-name",t),this.setState((i=>({...i,[t]:{...i[t],triggerElement:o?this:i[t].triggerElement,eventType:e}})))(`${this.componentName}/setTriggerElement`)}))}get stateName(){return"xo-popover"}get componentName(){return zt.PopoverTrigger}get eventType(){return this.options.xoType}get actionType(){return"toggle"}get options(){const t=nt(this,{pick:["xoName","xoType"],types:{xoName:"string",xoType:"string"}}),e=this.closest("[xo-name]");if(e){const o=nt(e,{pick:["xoName"],types:{xoName:"string"}});return{...Ue.defaultOptions,...o,...t}}return{...Ue.defaultOptions,...t}}};let Xe=Ue;function Ye(t,e,o,i){var s,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,o,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,o,r):s(e,o))||r);return n>3&&r&&Object.defineProperty(e,o,r),r}function Ge(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}o(Xe,"defaultOptions",{xoName:null,xoType:"click"}),se.create("xo-popover",{initialState:{trigger:{},data:{}}}),"function"==typeof SuppressedError&&SuppressedError;let je=(h=class extends Mt{constructor(){super(),o(this,"handleToggle",(t=>{t.target.closest(zt.BuilderPopoverContent)||this.setState({isOpen:!this.state.isOpen})})),o(this,"handleDocumentClick",(t=>{const e=t.target;this.contains(e)||this.setState({isOpen:!1})})),o(this,"bindEvent",(()=>{const{xoType:t}=this.props;"click"===t&&(this.addEventListener("click",this.handleToggle),document.addEventListener("click",this.handleDocumentClick))})),o(this,"addCssVars",(()=>{const{xoDuration:t}=this.props;this.style.setProperty("--xo-popover-duration",`${t}ms`)})),this.state={isOpen:!1}}mount(){this.addCssVars(),this.bindEvent()}unmount(){this.removeEventListener("click",this.handleToggle)}stateUpdate(t){if(t.isOpen!==this.state.isOpen){const t=this.querySelector(zt.BuilderPopoverContent);$(this,"xo-open",this.state.isOpen),t&&$(t,"xo-open",this.state.isOpen)}}propUpdate({name:t,prevProp:e,nextProp:o}){"xoDuration"===t&&e!==o&&this.addCssVars(),"xoType"===t&&e!==o&&(this.removeEventListener("click",this.handleToggle),this.bindEvent())}},o(h,"propTypes",{xoAnimate:"string",xoDuration:"number",xoPlacement:"string",xoType:"string"}),o(h,"defaultProps",{xoType:"click",xoPlacement:"bottom-center",xoAnimate:"fade-up",xoDuration:300}),o(h,"observedProps",["xoType","xoDuration"]),h);je=Ye([$t(zt.BuilderPopover),Ge("design:paramtypes",[])],je),window.xoPopover=Ve,F({[zt.Popover]:We,[zt.PopoverTrigger]:Xe});const Qe=class extends HTMLElement{constructor(){super(...arguments),o(this,"contentEl",null),o(this,"_options"),o(this,"setOptions",(()=>{this.options=nt(this,{pick:["xoTitle","xoAnimate","xoDuration","xoPlacement","xoPortalClass"],types:{xoTitle:"string",xoAnimate:"string",xoDuration:"number",xoPlacement:"string",xoPortalClass:"string"}})})),o(this,"handleShow",(async()=>{var t;window.removeEventListener("scroll",this.handleHide,!1),window.addEventListener("scroll",this.handleHide,!1);const e=null!=(t=this.closest(`${zt.Popover}, ${zt.Modal}`))?t:document.body;this.contentEl||(this.contentEl=this.createPortal(),e.appendChild(this.contentEl));const{xoPlacement:o,xoAnimate:i,xoDuration:s,xoOffset:n,xoTitle:r,xoPortalClass:a}=this.options;this.contentEl.innerHTML=r,this.contentEl.style.removeProperty("transition-duration"),this.contentEl.setAttribute("xo-placement",o),this.contentEl.setAttribute("xo-animate",i),a&&this.contentEl.classList.add(a),e.tagName.toLowerCase()===zt.Modal&&this.contentEl.setAttribute("slot",`${e.getAttribute("xo-name")}-inner`);const l=xt(this,{placement:o,offset:n,element:this.contentEl});let c=`${l.top}px`,h=`${l.left}px`;if([zt.Modal,zt.Popover].includes(e.tagName.toLowerCase()))if(e.tagName.toLowerCase()===zt.Modal){const t=e.getShadow().querySelector(zt.ModalContent),{left:o,top:i}=dt(t);c=l.top-i+"px",h=l.left-o+"px"}else{const{left:t,top:o}=dt(e);c=l.top-o+"px",h=l.left-t+"px"}this.contentEl.style.top!==c&&(this.contentEl.style.top=c),this.contentEl.style.left!==h&&(this.contentEl.style.left=h),await X(0),this.contentEl.style.transitionDuration=`${i?s:0}ms`,$(this.contentEl,"xo-active",!0)})),o(this,"handleHide",(async()=>{this.contentEl&&$(this.contentEl,"xo-active",!1)})),o(this,"handleTooltip",(t=>{this.contains(t.target)||this.handleHide()})),o(this,"createPortal",(()=>document.createElement(zt.TooltipContent)))}get options(){return{...Qe.defaultOptions,...this._options}}set options(t){this._options=t}connectedCallback(){this.setOptions(),this.addEventListener("mouseenter",this.handleShow,!1),window.addEventListener("mousemove",this.handleTooltip,!1)}disconnectedCallback(){window.removeEventListener("mousemove",this.handleTooltip,!1),window.removeEventListener("scroll",this.handleHide,!1),this.removeEventListener("mouseenter",this.handleShow,!1)}};let Ze=Qe;o(Ze,"defaultOptions",{xoTitle:"",xoAnimate:"fade-down",xoDuration:400,xoPlacement:"top-center",xoPortalClass:"",xoOffset:10}),F({[zt.Tooltip]:Ze});const Ke=new class{constructor(){o(this,"stateName","xo-collapse"),o(this,"toggle",(t=>{se.set(this.stateName,(e=>({...e,[t]:{...e[t],isOpen:!e[t].isOpen}})))(`${this.stateName}/toggle`)})),o(this,"open",(t=>{se.set(this.stateName,(e=>({...e,[t]:{...e[t],isOpen:!0}})))(`${this.stateName}/open`)})),o(this,"close",(t=>{se.set(this.stateName,(e=>({...e,[t]:{...e[t],isOpen:!1}})))(`${this.stateName}/close`)}))}};function Je(t){return t&&t.tagName.toLowerCase()===zt.CollapseProvider}const to=class extends HTMLElement{constructor(){super(...arguments),o(this,"animated",z()),o(this,"unsubscribe",null),o(this,"frameId",-1),o(this,"clear",(()=>{})),o(this,"initialized",!1),o(this,"prevIsOpen",!1),o(this,"_options"),o(this,"componentOpen",(()=>{const{xoDuration:t,xoEasing:e}=this.options,o=this.scrollHeight;this.animated({from:0,to:o,duration:t,easing:G[e],onUpdate:t=>{this.style.height=0===o?"auto":`${t}px`},onEnd:()=>{this.style.height="auto"}})})),o(this,"componentClose",(()=>{const{xoDuration:t,xoEasing:e}=this.options,o=this.scrollHeight;this.animated({from:o,to:0,duration:t,easing:G[e],onUpdate:t=>{this.style.height=`${t}px`}})})),o(this,"listener",(t=>{const{xoName:e}=this.options;if(I(this.componentName,"xo-name",e),t[e]){const{isOpen:o}=t[e];this.initialized&&o!==this.prevIsOpen&&(o?($(this,"xo-active",!0),this.componentOpen()):($(this,"xo-active",!1),this.componentClose()),this.prevIsOpen=o)}})),o(this,"setOptions",(()=>{const t=nt(this,{pick:["xoName","xoDuration","xoEasing"],types:{xoName:"string",xoDuration:"number",xoEasing:"string"}});if(Je(this.providerElement)&&function(t){return t&&t.tagName.toLowerCase()===zt.CollapseTrigger}(this.triggerElement)){const e={xoName:this.triggerElement.xoNameProp,xoDuration:Number(this.providerElement.getAttribute("xo-duration")||300)};this.options={...to.defaultOptions,...e,...t}}else this.options={...to.defaultOptions,...t}}))}static get observedAttributes(){return["xo-observed"]}get componentName(){return zt.Collapse}get options(){return{...to.defaultOptions,...this._options}}set options(t){this._options=t}get providerElement(){return this.closest(zt.CollapseProvider)}get triggerElement(){return this.previousElementSibling}async connectedCallback(){this.setOptions();const{xoName:t}=this.options;I(this.componentName,"xo-name",t),this.initialized=!0,"xoSections"==={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}.VITE_BUILD_MODE?(this.clear=await X(200),M(this,"xo-active")&&Ke.open(t)):M(this,"xo-active")&&(await X(),Ke.open(t)),this.unsubscribe=se.subscribe("xo-collapse",this.listener)}attributeChangedCallback(t,e,o){if("xo-observed"===t&&e!==o){this.setOptions();const t=M(this,"xo-active");t?this.style.height="auto":this.style.removeProperty("height");const{xoName:e}=this.options;I(this.componentName,"xo-name",e),se.set("xo-collapse",(o=>({...o,[e]:{...null==o?void 0:o[e],isOpen:t}})))}}disconnectedCallback(){var t;this.animated.off(),null==(t=this.unsubscribe)||t.call(this),this.clear(),cancelAnimationFrame(this.frameId)}};let eo=to;o(eo,"defaultOptions",{xoName:null,xoDuration:300,xoEasing:"decay"});let oo=0;const io=class extends HTMLElement{constructor(){super(...arguments),o(this,"xoNameProp",""),o(this,"_options"),o(this,"handleCollapseHasProvider",(()=>{const{xoName:t}=this.options;Je(this.providerElement)||I(this.componentName,"xo-name",t),q(Array.from(this.providerElement.querySelectorAll(zt.CollapseTrigger)),(t=>{const e=t.getAttribute("xo-name")||t.xoNameProp;this!==t||this.hasAttribute("xo-active")?$(t,"xo-active",!1):$(t,"xo-active",!0),e&&se.set("xo-collapse",(o=>{var i;return{...o,[e]:{...null==o?void 0:o[e],isOpen:this===t&&!(null!=(i=null==o?void 0:o[e])&&i.isOpen)}}}))}))})),o(this,"handleCollapse",(()=>{const{xoName:t}=this.options;Je(this.providerElement)||I(this.componentName,"xo-name",t),M(this,"xo-active")?$(this,"xo-active",!1):$(this,"xo-active",!0),Ke.toggle(t)})),o(this,"handleClick",(()=>{var t,e;const{xoName:o}=this.options,i=Number(null==(t=this.providerElement)?void 0:t.getAttribute("xo-duration"))||Number(null==(e=document.querySelector(`${zt.Collapse}[xo-name="${o}"]`))?void 0:e.getAttribute("xo-duration"))||300,s=Date.now();s-oo{var o,i;return{...t,[e]:{...null==t?void 0:t[e],isOpen:null!=(i=null==(o=null==t?void 0:t[e])?void 0:o.isOpen)&&i}}})),this.addEventListener("click",this.handleClick)}disconnectedCallback(){this.removeEventListener("click",this.handleClick)}};let so=io;o(so,"defaultOptions",{xoName:null});let no=0;class ro extends HTMLElement{constructor(){super(),o(this,"xoName"),no++,this.xoName=`collapse-${no}`}static get observedAttributes(){return["xo-observed"]}attributeChangedCallback(t,e,o){"xo-observed"===t&&e!==o&&q([...Array.from(this.querySelectorAll(zt.CollapseTrigger)),...Array.from(this.querySelectorAll(zt.Collapse))],(t=>{t.setAttribute("xo-observed",o)}))}}function ao(t){return t&&t.tagName.toLowerCase()===zt.Tabs}se.create("xo-collapse",{initialState:{}}),window.xoCollapse=Ke,F({[zt.CollapseProvider]:ro,[zt.CollapseTrigger]:so,[zt.Collapse]:eo});const lo=class extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",null),o(this,"listener",(t=>{const{xoName:e}=this.options;if(I(this.componentName,"xo-name",e),t[this.providerElement.xoName]){const{name:o}=t[this.providerElement.xoName];$(this,"xo-active",o===e)}}))}get componentName(){return zt.TabsPane}get providerElement(){return this.closest(zt.Tabs)}get options(){const t=nt(this,{pick:["xoName"],types:{xoName:"string"}});return{...lo.defaultOptions,...t}}connectedCallback(){const{xoName:t}=this.options;I(this.componentName,"xo-name",t),ao(this.providerElement)||L(`The ${this.componentName} component must be a child of the ${zt.Tabs} component`),this.unsubscribe=se.subscribe("xo-tabs",this.listener)}disconnectedCallback(){var t;null==(t=this.unsubscribe)||t.call(this)}};let co=lo;function ho(t,{name:e,width:o=0,left:i}){se.set("xo-tabs",(s=>{var n,r,a,l;return{...s,[t]:{...s[t],name:e,width:null==o?null!=(r=null==(n=s[t])?void 0:n.width)?r:0:o,left:null==i?null!=(l=null==(a=s[t])?void 0:a.left)?l:0:i}}}))}o(co,"defaultOptions",{xoName:null});const uo={active:ho},po=class extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",null),o(this,"providerName",null),o(this,"_options"),o(this,"setOptions",(()=>{this.options=nt(this,{pick:["xoName","xoTrigger","xoActive"],types:{xoName:"string",xoTrigger:"string",xoActive:"boolean"}})})),o(this,"listener",(t=>{const{xoName:e}=this.options;if(I(this.componentName,"xo-name",e),this.providerName&&t[this.providerName]){const{name:o}=t[this.providerName];$(this,"xo-active",o===e)}})),o(this,"handleActive",(async t=>{const{xoName:e}=this.options;if(I(this.componentName,"xo-name",e),await X(0),this.providerName)if(this.providerElement){const t=this.providerElement.querySelector(zt.TabsActive),o=null==t?void 0:t.parentElement,i=o?dt(this).left-dt(o).left:0;o&&"static"===window.getComputedStyle(o).position&&(o.style.position="relative"),ho(this.providerName,{name:e,left:i,width:this.offsetWidth})}else q(Array.from(document.querySelectorAll(zt.ListPortal)),(o=>{if(t&&t.target instanceof HTMLElement&&o.contains(t.target)){const o=t.currentTarget,i=setTimeout((()=>{this.providerName&&ho(this.providerName,{name:e,width:o.offsetWidth,left:o.offsetLeft}),clearTimeout(i)}),0)}}))})),o(this,"addTrigger",(()=>{"hover"!==this.options.xoTrigger||ct?this.addEventListener("click",this.handleActive):this.addEventListener("mouseenter",this.handleActive)})),o(this,"removeTrigger",(()=>{this.removeEventListener("mouseenter",this.handleActive),this.removeEventListener("click",this.handleActive)}))}get componentName(){return zt.TabsTrigger}get providerElement(){return this.closest(zt.Tabs)}get options(){return{...po.defaultOptions,...this._options}}set options(t){this._options=t}static get observedAttributes(){return["xo-observed"]}connectedCallback(){var t;this.setOptions(),null!=(t=this.providerElement)&&t.xoName&&(this.providerName=this.providerElement.xoName),M(this,"xo-active")&&this.handleActive(),this.unsubscribe=se.subscribe("xo-tabs",this.listener),this.addTrigger()}disconnectedCallback(){var t;this.removeTrigger(),null==(t=this.unsubscribe)||t.call(this)}async attributeChangedCallback(t,e,o){var i;"xo-observed"===t&&e!==o&&(await X(100),this.setOptions(),null!=(i=this.providerElement)&&i.xoName&&(this.providerName=this.providerElement.xoName),M(this,"xo-active")&&this.handleActive(),this.removeTrigger(),this.addTrigger(),this.listener(se.get("xo-tabs")))}};let mo=po;o(mo,"defaultOptions",{xoName:null,xoTrigger:"click"});let xo=0;class go extends HTMLElement{constructor(){super(),o(this,"xoName"),xo++,this.xoName=`tabs-${xo}`}static get observedAttributes(){return["xo-observed"]}attributeChangedCallback(t,e,o){"xo-observed"===t&&null!=e&&e!==o&&q([...Array.from(this.querySelectorAll(zt.TabsActive)),...Array.from(this.querySelectorAll(zt.TabsTrigger)),...Array.from(this.querySelectorAll(zt.TabsPane))],(t=>{t.setAttribute("xo-observed",o)}))}}const vo=class extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"animated",z()),o(this,"prevLeft",0),o(this,"prevWidth",0),o(this,"initialized",!1),o(this,"_options"),o(this,"setOptions",(()=>{this.options=nt(this,{pick:["xoDuration","xoEasing"],types:{xoDuration:"number",xoEasing:"string"}})})),o(this,"listener",(t=>{const{xoDuration:e,xoEasing:o}=this.options;if(ao(this.providerElement)&&t[this.providerElement.xoName]){const{width:i=0,left:s=0}=t[this.providerElement.xoName];if(this.initialized){const t=s+100;this.animated.off(),this.animated({from:this.prevLeft,to:t,duration:e,onUpdate:e=>{const n=at({value:e,inputRange:[this.prevLeft,t],outputRange:[this.prevWidth,i],reverseEasing:this.prevLeft>s,easing:G[o]}),r=at({value:e,inputRange:[this.prevLeft,t],outputRange:[this.prevLeft,s],reverseEasing:this.prevLeft>s,easing:G[o]});this.style.width=`${n}px`,this.style.transform=`translateX(${r}px)`},onEnd:()=>{this.prevLeft=s,this.prevWidth=i}})}else this.style.width=`${i}px`,this.style.transform=`translateX(${s}px)`,this.prevLeft=s,this.prevWidth=i;this.initialized=!0}}))}get options(){return{...vo.defaultOptions,...this._options}}set options(t){this._options=t}static get observedAttributes(){return["xo-observed"]}get providerElement(){return this.closest(zt.Tabs)}connectedCallback(){this.setOptions(),this.unsubscribe=se.subscribe("xo-tabs",this.listener)}disconnectedCallback(){this.unsubscribe(),this.animated.off()}attributeChangedCallback(t,e,o){"xo-observed"===t&&e!==o&&(this.setOptions(),this.initialized=!1,this.listener(se.get("xo-tabs")||{}))}};let bo=vo;o(bo,"defaultOptions",{xoDuration:200,xoEasing:"ease"}),se.create("xo-tabs",{initialState:{}}),window.xoTabs=uo,F({[zt.Tabs]:go,[zt.TabsActive]:bo,[zt.TabsTrigger]:mo,[zt.TabsPane]:co});class fo extends HTMLElement{constructor(){super(...arguments),o(this,"keyframes",{}),o(this,"parallax",null),o(this,"beautyAttr",(()=>{const t=this.getAttribute("xo-breakpoints"),e=this.getAttribute("xo-keyframes");t&&this.setAttribute("xo-breakpoints",t.replace(/\s+/g," ").trim()),e&&this.setAttribute("xo-keyframes",e.replace(/\s+/g," ").trim())})),o(this,"init",(()=>{const t=this.closest(`${zt.Parallax}, [${zt.Parallax}]`);if(this.getAttribute("xo-keyframes")||L(`The ${zt.ParallaxScroll} component must have the "xo-keyframes" attribute`),t&&(t.tagName.toLowerCase()===zt.Parallax||t.hasAttribute(zt.Parallax))){const{xoLerpEase:e=.08,xoBackfaceVisibility:o="hidden"}=this.getOptions();"hidden"===o&&(this.style.backfaceVisibility="hidden"),this.setKeyframes(),this.parallax=te({lerpEase:e}),this.beautyAttr(),this.parallax.add(this,{from:()=>dt(t).top-window.innerHeight,to:()=>dt(t).top+t.offsetHeight,keyframes:this.keyframes}).run()}})),o(this,"handleResize",U(kt("x",(()=>{var t;null==(t=this.parallax)||t.destroy(),this.init()})),500))}static get observedAttributes(){return["xo-observed","xo-keyframes","xo-breakpoints","xo-lerp-ease","xo-backface-visibility"]}getOptions(){return nt(this,{pick:["xoKeyframes","xoBreakpoints","xoLerpEase","xoBackfaceVisibility"],types:{xoKeyframes:"object",xoBreakpoints:"object",xoLerpEase:"number",xoBackfaceVisibility:"string"}})}setKeyframes(){var t;const{xoKeyframes:e,xoBreakpoints:o}=this.getOptions();this.keyframes=null!=(t=Ct(o))?t:e}connectedCallback(){this.init(),window.addEventListener("resize",this.handleResize)}disconnectedCallback(){var t;null==(t=this.parallax)||t.destroy(),window.removeEventListener("resize",this.handleResize)}async attributeChangedCallback(t,e,o){("xo-observed"===t||"xo-keyframes"===t||"xo-breakpoints"===t||"xo-lerp-ease"===t||"xo-backface-visibility"===t)&&e!==o&&(await X(100),this.disconnectedCallback(),this.connectedCallback())}}const yo=1e3/60,Eo=class extends HTMLElement{constructor(){super(...arguments),o(this,"shadow",this.attachShadow({mode:"open"})),o(this,"providerEl",null),o(this,"targetValueX",0),o(this,"targetValueY",0),o(this,"currentValueX",0),o(this,"currentValueY",0),o(this,"handleParallax",(t=>{var e;const{xoStrength:o,xo3d:i}=this.getOptions();let s=t/yo;const n=Math.round(s);n>=1&&(s=n);const r=Number((null==(e=this.providerEl)?void 0:e.getAttribute("xo-lerp-ease"))||"0.08"),a=Yt(this.currentValueX,this.targetValueX,r*s),l=Yt(this.currentValueY,this.targetValueY,r*s),c=this.shadow.querySelector(zt.ParallaxHoverInner);i?(c.style.transformStyle="preserve-3d",c.style.transform=`perspective(2000px) rotateX(${-l/4*o}deg) rotateY(${a/4*o}deg)`):c.style.transform=`translate3d(${a*o}px, ${l*o}px, 0)`,this.currentValueX=a,this.currentValueY=l})),o(this,"handleFrameSyncUpdate",(({delta:t})=>{const e=Math.abs(this.targetValueX-this.currentValueX),o=Math.abs(this.targetValueY-this.currentValueY);e<.001&&o<.001||this.handleParallax(t)})),o(this,"setTargetValue",((t,e,o,i,s)=>{const n=dt(this).left+this.offsetWidth/2,r=dt(this).top+this.offsetHeight/2;this.targetValueX=at({value:t.pageX-e,inputRange:[0,n-e,i],outputRange:[-1,0,1]}),this.targetValueY=at({value:t.pageY-o,inputRange:[0,r-o,s],outputRange:[-1,0,1]})})),o(this,"handleMouseMove",(t=>{const e=dt(this.providerEl).left,o=dt(this.providerEl).top,i=this.providerEl.offsetWidth,s=this.providerEl.offsetHeight;this.setTargetValue(t,e,o,i,s)})),o(this,"handleMouseLeave",(()=>{const{xoResetPosition:t}=this.getOptions();t&&(this.targetValueX=0,this.targetValueY=0)}))}static get observedAttributes(){return["xo-observed","xo-strength","xo-reset-position","xo-3d","xo-inner-width"]}getOptions(){const t=nt(this,{pick:["xoStrength","xoResetPosition","xo3d","xoInnerWidth"],types:{xoStrength:"number",xoResetPosition:"boolean",xo3d:"boolean",xoInnerWidth:"string"}});return{...Eo.defaultOptions,...t}}connectedCallback(){if(J.remove(this.handleFrameSyncUpdate),J.add(this.handleFrameSyncUpdate,!0),this.providerEl=this.closest(`${zt.Parallax}, [${zt.Parallax}]`),!this.providerEl)throw new Error(`The ${zt.ParallaxHover} component must be a child of ${zt.Parallax}`);if(!this.shadow.innerHTML){const{xoInnerWidth:t}=this.getOptions();this.shadow.innerHTML=`<${zt.ParallaxHoverInner} style="display: block; width: ${t}">`}this.handleParallax(1/60*1e3),this.providerEl.addEventListener("mousemove",this.handleMouseMove),this.providerEl.addEventListener("mouseleave",this.handleMouseLeave)}disconnectedCallback(){var t,e;J.remove(this.handleFrameSyncUpdate),null==(t=this.providerEl)||t.removeEventListener("mousemove",this.handleMouseMove),null==(e=this.providerEl)||e.removeEventListener("mouseleave",this.handleMouseLeave)}async attributeChangedCallback(t,e,o){("xo-observed"===t||"xo-strength"===t||"xo-reset-position"===t||"xo-3d"===t||"xo-inner-width"===t)&&e!==o&&(await X(100),this.disconnectedCallback(),this.connectedCallback())}};let wo=Eo;function So(t,e){se.set("xo-carousel",(o=>{var i,s,n,r,a,l,c,h,d,u,p,m,x,g,v,b,f;const y=null!=(s=null==(i=o[t])?void 0:i.slideLength)?s:0,E=null!=(a=null==(r=null==(n=o[t])?void 0:n.options)?void 0:r.xoPerView)?a:0,w=null!=(h=null==(c=null==(l=o[t])?void 0:l.options)?void 0:c.xoRewind)&&h,S=null!=(p=null==(u=null==(d=o[t])?void 0:d.options)?void 0:u.xoLoop)&&p&&"slide"!==(null==(x=null==(m=o[t])?void 0:m.options)?void 0:x.xoType),C=null!=(v=null==(g=o[t])?void 0:g.activeIndex)?v:0,k=null!=(f=null==(b=o[t])?void 0:b.thumbnailActiveIndex)?f:0;let A=S?Tt(C+e,0,y-E):O(C+e,0,y-E),P=O(k+e,0,y-1);return w&&C===y-E&&(A=0),w&&k===y-1&&(P=0),{...o,[t]:{...o[t],activeIndex:A,thumbnailActiveIndex:P,useAnimated:!0,timestamp:Date.now()}}}))("xo-carousel/nextSlide")}function Co(t,e){se.set("xo-carousel",(o=>{var i,s,n,r,a,l,c,h,d,u,p,m,x,g,v;const b=null!=(n=null==(s=null==(i=o[t])?void 0:i.options)?void 0:s.xoPerView)?n:0,f=null!=(a=null==(r=o[t])?void 0:r.slideLength)?a:b,y=null!=(c=null==(l=o[t])?void 0:l.activeIndex)?c:0,E=null!=(u=null==(d=null==(h=o[t])?void 0:h.options)?void 0:d.xoRewind)&&u;let w=null!=(x=null==(m=null==(p=o[t])?void 0:p.options)?void 0:m.xoLoop)&&x&&"slide"!==(null==(v=null==(g=o[t])?void 0:g.options)?void 0:v.xoType)?Tt(y-e,0,f-b):Math.max(y-e,0);return E&&0===y&&(w=f-b),{...o,[t]:{...o[t],activeIndex:w,thumbnailActiveIndex:w,useAnimated:!0,timestamp:Date.now()}}}))("xo-carousel/prevSlide")}function ko(t,e,o){se.set("xo-carousel",(i=>{var s,n,r,a,l;const c=null!=(r=null==(n=null==(s=i[t])?void 0:s.options)?void 0:n.xoPerView)?r:0,h=null!=(l=null==(a=i[t])?void 0:a.slideLength)?l:c;let d=O(e,0,h-c),u=O(e,0,h-1);return{...i,[t]:{...i[t],activeIndex:d,thumbnailActiveIndex:u,useAnimated:o,timestamp:Date.now()}}}))("xo-carousel/goToSlide")}function Ao(t){var e;return{activeIndex:0,thumbnailActiveIndex:0,...null==(e=se.get("xo-carousel"))?void 0:e[t]}}function Po(t,e,o){return se.subscribe("xo-carousel",(o=>e(o[t])),((e,i)=>o?o(e,i):j(null==e?void 0:e[t],null==i?void 0:i[t])))}o(wo,"defaultOptions",{xoStrength:100,xoResetPosition:!0,xo3d:!1,xoInnerWidth:"fit-content"}),F({[zt.ParallaxScroll]:fo,[zt.ParallaxHover]:wo});const To={next:So,prev:Co,goTo:(t,e)=>{const{options:o}=Ao(t);let i=e;o.xoLoop&&(i=e+2*o.xoPerView),ko(t,i,!0)}},Mo=(t,e,o)=>{t.dispatchEvent(new CustomEvent("xo:carousel:resize",{bubbles:!0,detail:{width:e,height:o}}))},$o=4===window.navigator.hardwareConcurrency?1e3:500;let Lo=0;function Io(t){Lo=t}function Oo(){return Lo}let No=0;const Do=class extends HTMLElement{constructor(){super(),o(this,"unsubscribe",(()=>{})),o(this,"xoName"),o(this,"_options"),o(this,"prevActiveIndex",-1),o(this,"prevPaginationProgress",0),o(this,"animated1",z()),o(this,"animated2",z()),o(this,"resizeObserver",null),o(this,"prevWidth",0),o(this,"setOptions",(()=>{this.options=nt(this,{pick:["xoName","xoActiveIndex","xoPerView","xoPerMove","xoGap","xoSpeed","xoEasing","xoOverflow","xoVertical","xoAutoplay","xoHoverPause","xoRewind","xoRtl","xoBreakpoints","xoRenderBullet","xoAutoheight","xoType","xoLoop","xoColumnWidth","xoSnake","xoStopAutoplayOnInteraction"],types:{xoName:"string",xoActiveIndex:"number",xoPerView:"number",xoPerMove:"number",xoGap:"number",xoSpeed:"number",xoEasing:"string",xoOverflow:"string",xoVertical:"boolean",xoAutoplay:"number",xoHoverPause:"boolean",xoRewind:"boolean",xoRtl:"boolean",xoBreakpoints:"object",xoRenderBullet:"string",xoAutoheight:"boolean",xoType:"string",xoLoop:"boolean",xoColumnWidth:"number",xoSnake:"boolean",xoStopAutoplayOnInteraction:"boolean"}}),"xoSections"==={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}.VITE_BUILD_MODE&&(this.options={...this.options,xoAutoplay:0,xoLoop:!1})})),o(this,"setOptionsForStore",(()=>{var t,e,o,i,s;const{xoBreakpoints:n,xoPerView:r,xoPerMove:a,xoGap:l,xoOverflow:c,xoType:h,xoColumnWidth:d,xoSnake:u,xoVertical:p}=this.options,m=Ct(n),x="slide"===h,g=!!this.querySelector(zt.CarouselThumbnail),v=this.querySelector(zt.CarouselInner);let b={...this.options,xoPerView:x?null!=(t=null==m?void 0:m.perView)?t:r:1,xoPerMove:x?null!=(e=null==m?void 0:m.perMove)?e:Math.min(a,r):1,xoGap:x?null!=(o=null==m?void 0:m.gap)?o:l:0,xoAutoheight:!x||this.options.xoAutoheight,xoOverflow:null!=(i=null==m?void 0:m.overflow)?i:c,xoVertical:null!=(s=null==m?void 0:m.vertical)?s:p,xoRewind:this.options.xoRewind,xoLoop:!g&&this.options.xoLoop};if(b.xoPerView&&b.xoLoop&&v&&v.querySelectorAll(`${zt.CarouselSlide}:not([xo-cloned])`).length<=b.xoPerView&&(b={...b,xoLoop:!1}),d){const t=this.hasAttribute("xo-per-view"),e=Math.floor((this.offsetWidth+l)/(d+l)),o=t?Math.min(r,e):e;b={...b,xoPerView:o,xoPerMove:Math.min(o,a)}}u&&(b={...b,xoPerMove:b.xoPerView}),function(t,e){se.set("xo-carousel",(o=>({...o,[t]:{...o[t],options:e}})))}(this.xoName,b),this.style.setProperty("--xo-per-view",`${b.xoPerView}`),this.style.setProperty("--xo-gap",`${b.xoGap}px`),("fade"===h||"nature"===h||"water"===h||"urban"===h)&&this.style.setProperty("--xo-speed",`${b.xoSpeed}ms`);let f=0;b.xoLoop&&"slide"===b.xoType&&(f=4*b.xoPerView),v&&(function(t,e){se.set("xo-carousel",(o=>({...o,[t]:{...o[t],slideLength:e}})))}(this.xoName,v.querySelectorAll(`${zt.CarouselSlide}:not([xo-cloned])`).length+f),"visible"===b.xoOverflow?v.style.overflow="visible":v.style.overflow="hidden"),ko(this.xoName,this.options.xoActiveIndex+(b.xoLoop&&"slide"===b.xoType?2*r:0),!0)})),o(this,"beautyBreakpoints",(()=>{const t=this.getAttribute("xo-breakpoints");t&&this.setAttribute("xo-breakpoints",t.replace(/\s+/g," ").trim())})),o(this,"setHeightForVertical",(()=>{const{xoVertical:t,xoPerView:e,xoGap:o}=this.options;if(t){const t=this.querySelector(zt.CarouselInner),i=this.querySelectorAll(zt.CarouselSlide);if(t){const s=i[0].offsetHeight*e+(e-1)*o;t.style.height=t.style.height||`${s}px`}}})),o(this,"init",(()=>{this.setHeightForVertical(),this.setOptionsForStore(),((t,e)=>{t.dispatchEvent(new CustomEvent("xo:carousel:init",{bubbles:!0,detail:e}))})(this,this.options)})),o(this,"handleResize",U((t=>{for(let e of t){const t=e.contentRect.width,o=e.contentRect.height;t!==this.prevWidth&&(this.init(),this.prevWidth=t,Mo(this,t,o))}}),$o)),No++,this.setOptions(),this.options.xoName?this.xoName=this.options.xoName:this.xoName=`carousel-${No}`}static get observedAttributes(){return["xo-observed"]}get options(){return{...Do.defaultOptions,...this._options}}set options(t){this._options=t}connectedCallback(){this.setOptions(),"xoSections"==={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}.VITE_BUILD_MODE&&this.options.xoName&&(this.xoName=this.options.xoName),this.init(),this.beautyBreakpoints(),this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this),this.unsubscribe=Po(this.xoName,(({options:t,slideLength:e,activeIndex:o})=>{if(this.prevActiveIndex!==o){const i=t.xoLoop&&"slide"===t.xoType?e-4*t.xoPerView:e,s=t.xoLoop&&"slide"===t.xoType?Math.min(Math.max(o-2*t.xoPerView,0),i-t.xoPerView):o,n=at({value:s,inputRange:[0,i-t.xoPerView],outputRange:[0,100]});this.animated1.off(),this.animated1({from:this.prevPaginationProgress,to:n,duration:100===this.prevPaginationProgress?0:t.xoSpeed,onUpdate:t=>{this.style.setProperty("--xo-pagination-progress",`${t}%`)},onEnd:()=>{this.prevPaginationProgress=n}}),t.xoAutoplay&&(this.animated2.off(),this.animated2({from:0,to:100,duration:t.xoAutoplay,onUpdate:t=>{this.style.setProperty("--xo-autoplay-progress",`${t}%`)}})),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{activeIndex:s}})),this.prevActiveIndex=o}}))}async attributeChangedCallback(t,e,o){"xo-observed"===t&&e!==o&&(await X(50),this.setOptions(),this.setHeightForVertical(),this.setOptionsForStore(),q(Array.from(this.querySelectorAll(zt.CarouselList)),(t=>{t.closest(zt.CarouselThumbnail)||t.setAttribute("xo-observed",o)})))}disconnectedCallback(){var t;this.unsubscribe(),this.animated1.off(),this.animated2.off(),null==(t=this.resizeObserver)||t.disconnect(),(t=>{t.dispatchEvent(new CustomEvent("xo:carousel:destroy",{bubbles:!0}))})(this)}};let qo=Do;o(qo,"defaultOptions",{xoName:"",xoActiveIndex:0,xoPerView:1,xoPerMove:1,xoGap:20,xoSpeed:200,xoEasing:"easeOutQuad",xoOverflow:"hidden",xoVertical:!1,xoAutoplay:0,xoHoverPause:!1,xoRewind:!1,xoRtl:"rtl"===document.documentElement.dir,xoRenderBullet:"",xoBreakpoints:{},xoAutoheight:!1,xoType:"slide",xoLoop:!1,xoColumnWidth:0,xoSnake:!1,xoStopAutoplayOnInteraction:!1});const Ho=class extends HTMLElement{constructor(){super(...arguments),o(this,"_options"),o(this,"resizeObserver",null),o(this,"prevWidth",0),o(this,"setOptions",(()=>{this.options=nt(this,{pick:["xoPerView","xoPerMove","xoGap","xoBreakpoints","xoVertical"],types:{xoPerView:"number",xoPerMove:"number",xoGap:"number",xoBreakpoints:"object",xoVertical:"boolean"}})})),o(this,"setOptionsForStore",(()=>{var t,e,o,i;const{xoBreakpoints:s,xoPerView:n,xoPerMove:r,xoGap:a,xoVertical:l}=this.options,c=Ct(s),h={...this.options,xoPerView:null!=(t=null==c?void 0:c.perView)?t:n,xoPerMove:null!=(e=null==c?void 0:c.perMove)?e:Math.min(r,n),xoGap:null!=(o=null==c?void 0:c.gap)?o:a,xoVertical:null!=(i=null==c?void 0:c.vertical)?i:l},{xoName:d}=this.getProviderElement();(function(t,e){se.set("xo-carousel",(o=>({...o,[t]:{...o[t],thumbnailOptions:e}})))})(d,h),this.style.setProperty("--xo-per-view",`${h.xoPerView}`),this.style.setProperty("--xo-gap",`${h.xoGap}px`)})),o(this,"handleResize",U((t=>{for(let e of t){const t=e.contentRect.width;t!==this.prevWidth&&(this.setOptionsForStore(),this.prevWidth=t)}}),$o))}static get observedAttributes(){return["xo-observed"]}getProviderElement(){return this.closest(zt.Carousel)}get options(){return{...Ho.defaultOptions,...this._options}}set options(t){this._options=t}async connectedCallback(){await X(50);const t=this.getProviderElement();!t||(this.prevWidth=t.clientWidth,this.setOptions(),this.setOptionsForStore(),this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(t))}attributeChangedCallback(t,e,o){"xo-observed"===t&&e!==o&&(this.setOptions(),this.setOptionsForStore())}disconnectedCallback(){var t;null==(t=this.resizeObserver)||t.disconnect()}};let Fo=Ho;o(Fo,"defaultOptions",{xoPerView:5,xoPerMove:1,xoGap:10,xoBreakpoints:{},xoVertical:!1});const Ro="idle",Vo="target",zo="lock";class _o extends HTMLElement{constructor(){super(...arguments),o(this,"isThumbMoving",!1),o(this,"unsubscribe",(()=>{})),o(this,"animated",z()),o(this,"thumbAnimated",z()),o(this,"snakeAnimated",z()),o(this,"prevTranslate",0),o(this,"prevThumbTranslate",0),o(this,"axis",Ro),o(this,"pan",null),o(this,"thumbPan",null),o(this,"dEnd",0),o(this,"prevDx",null),o(this,"prevDy",null),o(this,"prevThumbDx",null),o(this,"prevThumbDy",null),o(this,"isMove",!1),o(this,"timeoutId",-1),o(this,"anchorEls",[]),o(this,"_options"),o(this,"initialized",!1),o(this,"autoPlayStart",Date.now()),o(this,"autoPlayNext",Date.now()),o(this,"tempStop",!1),o(this,"prevScrollY",-1),o(this,"startClientX",0),o(this,"isNextForSnake",!1),o(this,"isSnakeUpdated",!1),o(this,"resizeObserver",null),o(this,"intersectionObserver",null),o(this,"prevWidth",0),o(this,"wheelEndTimeId",-1),o(this,"wheelStarting",!1),o(this,"setOptions",(()=>{const{options:t,thumbnailOptions:e}=Ao(this.providerElement.xoName);this.isThumbnail?this.options={...t,...e}:this.options=t})),o(this,"withRtl",(t=>this.options.xoRtl?-1*t:t)),o(this,"setTranslate",(t=>{if(this.providerElement&&!isNaN(t)){const{xoType:e,xoVertical:o}=this.options;"slide"===e&&(this.style.transform=o?`translate3d(0, ${t}px, 0)`:`translate3d(${this.withRtl(t)}px, 0, 0)`)}})),o(this,"handleSlide",(t=>{if(!this.providerElement)return;const{options:e,activeIndex:o}=this,{slideLength:i}=Ao(this.providerElement.xoName),s=this.isThumbnail?i:i-e.xoPerView,n=this.isThumbnail?Math.floor(e.xoPerView/2):0,r=this.isThumbnail?e.xoPerView-n:0,a=this.isThumbnail?O(o,n,s-r):o;if(a<=s-r){const r=this.isThumbnail?O(a-n,0,s):o,l=i>e.xoPerView?-r*this.slideSize:0;"slide"===e.xoType&&this.animated({from:this.isThumbnail?this.prevThumbTranslate:this.prevTranslate,to:l,duration:t,easing:G[e.xoEasing],onUpdate:this.setTranslate,onEnd:t=>{if(this.pan&&(e.xoVertical?this.pan.setValue({dy:t}):this.pan.setValue({dx:this.withRtl(t)})),this.thumbPan&&(e.xoVertical?this.thumbPan.setValue({dy:t}):this.thumbPan.setValue({dx:this.withRtl(t)})),this.isThumbnail?this.prevThumbTranslate=t:this.prevTranslate=t,e.xoLoop){const t=r-2*e.xoPerView;if(t<=-1*e.xoPerView){const o=s-(2*e.xoPerView+-1*e.xoPerView-t);ko(this.providerElement.xoName,o,!1)}else if(t>=s-3*e.xoPerView){const o=2*e.xoPerView+t-(s-3*e.xoPerView);ko(this.providerElement.xoName,o,!1)}}}}),this.handleActiveSlide(r)}})),o(this,"handleSnake",(()=>{const{activeIndex:t,options:e}=Ao(this.providerElement.xoName),{xoSpeed:o,xoEasing:i,xoPerView:s}=e;this.snakeAnimated({from:0,to:1,duration:o,easing:G[i],onUpdate:e=>{const o=at({value:e,inputRange:[0,.5,1],outputRange:[0,15,0]});this.style.gap=`${o}rem`,this.isNextForSnake?this.style.marginLeft=`-${o*t}rem`:this.style.marginLeft=`-${o*(t+s-1)}rem`,this.isSnakeUpdated=!0},onEnd:()=>{this.isSnakeUpdated=!1}})})),o(this,"listener",(()=>{if(this.initialized){const{xoSpeed:t,xoSnake:e,xoPerView:o,xoLoop:i,xoType:s}=this.options,{useAnimated:n}=Ao(this.providerElement.xoName);if(this.autoPlayStart=Date.now(),this.handleSlide(n?t:0),!this.isSnakeUpdated&&e&&this.handleSnake(),this.providerElement){const t=i&&"slide"===s?this.activeIndex-2*o:this.activeIndex;((t,e)=>{t.dispatchEvent(new CustomEvent("xo:carousel:change",{bubbles:!0,detail:{activeIndex:e}}))})(this.providerElement,t)}}})),o(this,"rubberBandClamp",(t=>{const{slideLength:e}=Ao(this.providerElement.xoName),o=this.slideSize*e;return ft(this.getContainerSize()-o,0,t,.2)})),o(this,"panMove",(({dx:t,dy:e,vx:o,vy:i},s)=>{if(s.target.closest("model-viewer"))return;const{options:n}=this;if(this.isMove=!0,null==this.prevDx&&(this.prevDx=-this.slideSize*this.activeIndex),null==this.prevDy&&(this.prevDy=0),n.xoVertical?this.axis=Vo:ct?this.axis===Ro&&(Math.abs(t-this.prevDx)>2.5*Math.abs(e-this.prevDy)?this.axis=Vo:this.axis=zo):this.axis=Vo,this.axis===Vo){ct&&window.scrollY!==this.prevScrollY&&-1!==this.prevScrollY&&this.panEnd({dx:t,dy:e,vx:o,vy:i},s);const r=n.xoVertical?e:this.withRtl(t),a=this.rubberBandClamp(r);n.xoSnake?this.isNextForSnake=!0:this.setTranslate(a),this.prevTranslate=a}else ct&&this.style.removeProperty("touch-action")})),o(this,"magnet",((t,e,o,i,s)=>O(Math.round(t+(s?i:-i)),e,o))),o(this,"panEnd",((t,e)=>{if(!this.providerElement)return;const{options:o}=this;if(o.xoSnake){const t=e instanceof MouseEvent?e.clientX:e.changedTouches[0].clientX;this.isNextForSnake=this.startClientX>=t,this.isNextForSnake?So(this.providerElement.xoName,o.xoPerMove):Co(this.providerElement.xoName,o.xoPerMove)}else{const{d:e,v:i}=this.getDxy(t),{slideLength:s,activeIndex:n}=Ao(this.providerElement.xoName),r=this.slideSize*s,a=s-o.xoPerView,l=o.xoPerView>2?o.xoPerView:1,c=0===i?e:this.dEnd>e?e-i*l:e+i*l,h=(o.xoVertical?t.vy:t.vx)<0,d=(()=>"slide"===o.xoType?this.magnet(at({value:c,inputRange:[0,-r],outputRange:[0,s]}),0,a,.4,this.dEnd>e):o.xoLoop?Tt(h?n+1:n-1,0,a):O(h?n+1:n-1,0,a))();if(this.axis===Vo&&ko(this.providerElement.xoName,d,!0),d>0&&d<=a){if(this.pan)if(this.axis===Vo){if(o.xoVertical){const t=-d*this.slideSize;this.pan.setValue({dx:0,dy:t}),this.dEnd=t,this.prevDx=0,this.prevDy=t}else{const t=this.withRtl(-d*this.slideSize);this.pan.setValue({dx:t,dy:0}),this.dEnd=t,this.prevDx=t,this.prevDy=0}this.handleAutoPlay()}else this.pan.setValue({dx:this.prevDx,dy:this.prevDy})}else 0===d?this.pan&&(this.pan.setValue({dx:0,dy:0}),this.dEnd=0,this.prevDx=0,this.prevDy=0,this.handleAutoPlay()):this.animated({from:this.prevTranslate,to:-(s-o.xoPerView)*this.slideSize,duration:o.xoSpeed,easing:G[o.xoEasing],onUpdate:t=>{this.handlePause(),this.setTranslate(t)},onEnd:t=>{this.pan&&(o.xoVertical?(this.pan.setValue({dx:0,dy:t}),this.dEnd=t,this.prevDx=0,this.prevDy=t):(this.pan.setValue({dx:this.withRtl(t),dy:0}),this.dEnd=this.withRtl(t),this.prevDx=this.withRtl(t),this.prevDy=0),this.handleAutoPlay()),this.prevTranslate=t}});this.axis=Ro,clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((()=>{this.style.removeProperty("touch-action")}),300),this.prevScrollY=window.scrollY}})),o(this,"thumbPanMove",(({dx:t,dy:e,vx:o,vy:i})=>{var s,n;const{options:r}=this,{slideLength:a}=Ao(this.providerElement.xoName);if(this.isThumbMoving=!0,null==this.prevThumbDx&&(this.prevThumbDx=-this.slideSize*this.activeIndex),null==this.prevThumbDy&&(this.prevThumbDy=0),r.xoVertical?this.axis=Vo:ct?this.axis===Ro&&(Math.abs(t-this.prevThumbDx)>2.5*Math.abs(e-this.prevThumbDy)?this.axis=Vo:this.axis=zo):this.axis=Vo,this.axis===Vo){ct&&window.scrollY!==this.prevScrollY&&this.thumbPanEnd({dx:t,dy:e,vx:o,vy:i});const l=O(r.xoVertical?e:this.withRtl(t),-this.slideSize*(a-r.xoPerView),0);this.setTranslate(l),r.xoVertical?null==(s=this.thumbPan)||s.setValue({dx:0,dy:l}):null==(n=this.thumbPan)||n.setValue({dx:l,dy:0}),this.prevThumbTranslate=l}})),o(this,"thumbPanEnd",(({vx:t,vy:e})=>{const{options:o}=this,{slideLength:i}=Ao(this.providerElement.xoName),s=o.xoVertical?e:this.withRtl(t);this.thumbAnimated({from:this.prevThumbTranslate,to:this.prevThumbTranslate+10*s,duration:o.xoSpeed,easing:G.easeOutQuad,onUpdate:t=>{if(this.isThumbMoving){const e=O(t,-this.slideSize*(i-o.xoPerView),0);this.setTranslate(e)}},onEnd:t=>{const e=O(t,-this.slideSize*(i-o.xoPerView),0);this.thumbPan&&this.isThumbMoving&&(o.xoVertical?(this.thumbPan.setValue({dx:0,dy:e}),this.prevThumbDx=0,this.prevThumbDy=e):(this.thumbPan.setValue({dx:e,dy:0}),this.prevThumbDx=this.withRtl(e),this.prevThumbDy=0)),this.axis=Ro,clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((()=>{this.style.removeProperty("touch-action")}),300),this.isThumbMoving&&(this.prevThumbTranslate=e),this.isThumbMoving=!1,this.prevScrollY=window.scrollY}})})),o(this,"frameAutoPlay",(()=>{if(this.providerElement&&!this.isThumbnail){const t=this.providerElement.xoName,{options:e}=this;this.tempStop?this.autoPlayStart=Date.now():(this.autoPlayNext=Date.now(),this.autoPlayNext-this.autoPlayStart>=e.xoAutoplay&&(So(t,e.xoPerMove),this.autoPlayStart=Date.now()))}})),o(this,"removeFrameAutoPlay",(()=>{J.remove(this.frameAutoPlay)})),o(this,"handlePause",(()=>{this.autoPlayNext=Date.now(),this.tempStop=!0})),o(this,"handlePauseHover",(()=>{const{options:t}=this;t.xoHoverPause&&this.handlePause()})),o(this,"handleAutoPlay",(()=>{this.tempStop=!1})),o(this,"handleActiveSlide",(t=>{let e=-1,o=0;const{options:i,activeIndex:s}=this,{slideLength:n}=Ao(this.providerElement.xoName),r=i.xoLoop&&"slide"===i.xoType?s-2*i.xoPerView:s,a=this.isThumbnail&&null!=t?t:r;q(Array.from(this.children),(async s=>{if(s.tagName.toLowerCase()===zt.CarouselSlide&&!M(s,"xo-cloned"))if(e++,s.index=e,s.setAttribute("aria-label",`${e+1} / ${i.xoLoop&&"slide"===i.xoType?n-4*i.xoPerView:n}`),s.setAttribute("role","tabpanel"),$(s,"xo-active",r===e),e>=a&&e{this.parentElement&&function(t,e,o){se.set("xo-carousel",(i=>({...i,[t]:{...i[t],containerWidth:e,containerHeight:o}})))}(this.providerElement.xoName,this.parentElement.offsetWidth,this.parentElement.offsetHeight)})),o(this,"handleResize",U((t=>{for(let e of t){const t=e.contentRect.width;t!==this.prevWidth&&(this.disconnectedCallback(),this.connectedCallback(),this.prevWidth=t)}}),$o)),o(this,"handleWindowResize",U(kt("x",(()=>{ko(this.providerElement.xoName,0,!1)})),$o)),o(this,"handleIntersection",(t=>{for(const e of t)e.isIntersecting&&this.handleActiveSlide()})),o(this,"handleAnchor",(t=>{this.isMove&&t.preventDefault()})),o(this,"bindAnchor",(()=>{this.anchorEls=Array.from(this.querySelectorAll("a")),q(this.anchorEls,(t=>{t.addEventListener("click",this.handleAnchor)}))})),o(this,"handleLoop",(()=>{const{xoPerView:t,xoLoop:e,xoType:o}=this.options;!e||"slide"===o&&function(t,e){const o=Array.from(t.children),i=[...o.slice(0,2*e),...o.slice(0,2*e)],s=[...o.slice(2*-e),...o.slice(2*-e)];q(i,((o,i)=>{if(i<2*e&&o.tagName.toLowerCase()===zt.CarouselSlide){const e=o.cloneNode(!0);e.removeAttribute("xo-active"),e.removeAttribute("xo-visible"),$(e,"xo-cloned",!0),t.appendChild(e)}})),q(s,((i,n)=>{if(n>=s.length-2*e&&i.tagName.toLowerCase()===zt.CarouselSlide){const e=i.cloneNode(!0);e.removeAttribute("xo-active"),e.removeAttribute("xo-visible"),$(e,"xo-cloned",!0),t.insertBefore(e,o[0])}}))}(this,t)})),o(this,"removeSlideCloned",(()=>{q(Array.from(this.children),(t=>{t.tagName.toLowerCase()===zt.CarouselSlide&&M(t,"xo-cloned")&&this.removeChild(t)}))})),o(this,"handleSlideClick",(()=>{this.options.xoStopAutoplayOnInteraction&&this.removeFrameAutoPlay()})),o(this,"handleWheel",(t=>{if(!this.wheelStarting&&Math.abs(t.deltaX)>Math.abs(t.deltaY)){const{xoPerView:e}=this.options;t.deltaX>0?So(this.providerElement.xoName,e):Co(this.providerElement.xoName,e)}this.wheelStarting=!0,clearTimeout(this.wheelEndTimeId),this.wheelEndTimeId=window.setTimeout((()=>{this.wheelStarting=!1}),50)})),o(this,"reset",(()=>{var t,e,o,i;this.unsubscribe(),this.removeFrameAutoPlay(),this.removeSlideCloned(),null==(t=this.pan)||t.destroy(),null==(e=this.thumbPan)||e.destroy(),clearTimeout(this.timeoutId),clearTimeout(this.wheelEndTimeId),this.animated.off(),this.snakeAnimated.off(),null==(o=this.resizeObserver)||o.disconnect(),null==(i=this.intersectionObserver)||i.disconnect(),this.providerElement&&(this.providerElement.removeEventListener("click",this.handleSlideClick),this.providerElement.removeEventListener("mouseenter",this.handlePauseHover),this.providerElement.removeEventListener("mouseleave",this.handleAutoPlay),this.providerElement.removeEventListener("touchstart",this.handlePauseHover),this.providerElement.removeEventListener("touchend",this.handleAutoPlay),this.providerElement.removeEventListener("wheel",this.handleWheel)),q(this.anchorEls,(t=>{t.removeEventListener("click",this.handleAnchor)})),ct||window.removeEventListener("resize",this.handleWindowResize)}))}get providerElement(){return this.closest(zt.Carousel)}static get observedAttributes(){return["xo-observed"]}get slideSize(){const{slideLength:t}=Ao(this.providerElement.xoName);return this.options.xoVertical?this.scrollHeight/t:this.scrollWidth/t}getContainerSize(){const{containerWidth:t,containerHeight:e}=Ao(this.providerElement.xoName);return this.options.xoVertical?e:t}get isThumbnail(){return!!this.closest(zt.CarouselThumbnail)}get options(){return this._options}set options(t){this._options=t}get activeIndex(){const{activeIndex:t,thumbnailActiveIndex:e}=Ao(this.providerElement.xoName);return this.isThumbnail?e:t}getDxy({dx:t,dy:e,vx:o,vy:i}){return this.options.xoVertical?{d:e,v:Math.abs(i)}:{d:this.withRtl(t),v:Math.abs(o)}}async connectedCallback(){if(await X(100),!this.providerElement)return;this.reset(),this.setOptions(),this.handleLoop(),this.setContainerSize(),this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.providerElement),ct||window.addEventListener("resize",this.handleWindowResize),this.providerElement.addEventListener("click",this.handleSlideClick);const{options:t}=this;if(t.xoAutoheight&&(this.intersectionObserver=new IntersectionObserver(this.handleIntersection),this.intersectionObserver.observe(this)),this.handleSlide(0),this.isThumbnail)this.thumbPan=pt({element:this,onStart:()=>{this.style.touchAction="none"},onMove:this.thumbPanMove,onEnd:this.thumbPanEnd});else{const{slideLength:e}=Ao(this.providerElement.xoName);if(e<=t.xoPerView&&!this.isThumbnail)return;this.pan=pt({element:this,onStart:t=>{t.target.closest("model-viewer")||(this.isMove=!1,this.autoPlayStart=Date.now(),this.tempStop=!0,this.startClientX=t instanceof MouseEvent?t.clientX:t.touches[0].clientX,this.style.touchAction="none")},onMove:t.xoSnake?void 0:this.panMove,onEnd:(t,e)=>{const o=e.target.closest(zt.CarouselNext),i=e.target.closest(zt.CarouselPrev);o||i||e.target.closest("model-viewer")||this.panEnd(t,e)}})}t.xoAutoplay&&J.add(this.frameAutoPlay,!0),this.handleActiveSlide(),this.bindAnchor(),this.unsubscribe=Po(this.providerElement.xoName,this.listener),this.providerElement.addEventListener("mouseenter",this.handlePauseHover),this.providerElement.addEventListener("mouseleave",this.handleAutoPlay),ct&&(this.providerElement.addEventListener("touchstart",this.handlePauseHover),this.providerElement.addEventListener("touchend",this.handleAutoPlay)),this.providerElement.addEventListener("wheel",this.handleWheel),$(this.providerElement,"xo-initialized",!0),this.initialized=!0}async attributeChangedCallback(t,e,o){"xo-observed"===t&&e!==o&&(await X(100),this.connectedCallback())}disconnectedCallback(){this.reset()}}class Bo extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"index",0),o(this,"handleClick",(()=>{const t=this.closest(zt.CarouselList);if(null==t||!t.isThumbMoving){const{xoName:t}=this.providerElement;ko(t,this.index,!0)}}))}get providerElement(){return this.closest(zt.Carousel)}get isThumbnail(){return!!this.closest(zt.CarouselThumbnail)}connectedCallback(){!this.providerElement||this.isThumbnail&&(ct?this.addEventListener("touchend",this.handleClick):this.addEventListener("mouseup",this.handleClick))}disconnectedCallback(){!this.providerElement||(this.unsubscribe(),this.isThumbnail&&(ct?this.removeEventListener("touchend",this.handleClick):this.removeEventListener("mouseup",this.handleClick)))}}class Wo extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"setAttrDisabled",(({options:t,activeIndex:e,slideLength:o})=>{t.xoLoop||(t.xoRewind||e!==o-t.xoPerView?$(this,"xo-disabled",!1):$(this,"xo-disabled",!0)),o<=t.xoPerView?$(this,"xo-hide",!0):$(this,"xo-hide",!1)})),o(this,"listener",(t=>{this.setAttrDisabled(t)})),o(this,"nextSlide",(()=>{var t;if(!this.providerElement)return;const{options:e}=Ao(this.providerElement.xoName),o=Date.now();if(!(o-Oo(){})),o(this,"setAttrDisabled",(({options:t,activeIndex:e,slideLength:o})=>{t.xoLoop||(t.xoRewind||0!==e?$(this,"xo-disabled",!1):$(this,"xo-disabled",!0)),o<=t.xoPerView?$(this,"xo-hide",!0):$(this,"xo-hide",!1)})),o(this,"listener",(t=>{this.setAttrDisabled(t)})),o(this,"prevSlide",(()=>{var t;if(!this.providerElement)return;const{options:e}=Ao(this.providerElement.xoName),o=Date.now();if(!(o-Oo(){})),o(this,"listener",(t=>{this.renderBullet(t.slideLength,t.options)})),o(this,"renderBullet",((t,e)=>{const o=e.xoLoop&&"slide"===e.xoType?t-4*e.xoPerView:t,i=Array(Math.ceil(o/e.xoPerView)).fill(0);o<=e.xoPerView?this.innerHTML="":this.innerHTML=Z(i,((t,o)=>`\n <${zt.CarouselBullet} xo-index="${o}" xo-page="${o+1}">\n ${e.xoRenderBullet}\n \n `)).join("")}))}get providerElement(){return this.closest(zt.Carousel)}async connectedCallback(){if(await X(100),!this.providerElement)return;const t=Ao(this.providerElement.xoName);this.renderBullet(t.slideLength,t.options),this.unsubscribe=Po(this.providerElement.xoName,this.listener,((t,e)=>{var o,i;return j(null==(o=t[this.providerElement.xoName])?void 0:o.options,null==(i=e[this.providerElement.xoName])?void 0:i.options)}))}disconnectedCallback(){this.unsubscribe()}}let Yo=0;class Go extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"circleEl",null),o(this,"listener",(t=>{this.handler(t)})),o(this,"handler",(async({activeIndex:t,options:e,slideLength:o})=>{var i;const s=Number(null!=(i=this.getAttribute("xo-index"))?i:0),n=e.xoLoop&&"slide"===e.xoType?o-4*e.xoPerView:o,r=e.xoLoop&&"slide"===e.xoType?Math.min(t-2*e.xoPerView,n-e.xoPerView):t,a=Math.ceil(r/e.xoPerView);await X(0),s===a?($(this,"xo-active",!0),Me.animate(this.getCircleBarName(),{duration:e.xoAutoplay,value:100})):($(this,"xo-active",!1),Me.animate(this.getCircleBarName(),{duration:e.xoAutoplay,value:0}))})),o(this,"handleClick",(()=>{var t,e;const{xoName:o}=this.getProviderElement(),{options:i,slideLength:s,activeIndex:n}=Ao(o),r=Date.now();if(r-Yon)})),o(this,"getCircleBarName",(()=>this.getProviderElement()?`${this.getProviderElement().xoName}-${this.getAttribute("xo-index")}`:"")),o(this,"handleCircleBar",(()=>{this.circleEl=this.querySelector(zt.CircleBar),this.circleEl&&this.circleEl.setAttribute("xo-name",this.getCircleBarName())}))}getProviderElement(){return this.closest(zt.Carousel)}connectedCallback(){const t=this.getProviderElement();if(!t)return;const e=Ao(t.xoName);this.handler(e),this.handleCircleBar(),this.addEventListener("click",this.handleClick),this.unsubscribe=Po(t.xoName,this.listener)}disconnectedCallback(){this.unsubscribe(),this.removeEventListener("click",this.handleClick)}}class jo extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"listener",(({options:t,slideLength:e})=>{t.xoLoop?this.innerText=""+(e-4*t.xoPerView):this.innerText=`${e}`}))}get providerElement(){return this.closest(zt.Carousel)}connectedCallback(){!this.providerElement||(this.unsubscribe=Po(this.providerElement.xoName,this.listener))}disconnectedCallback(){this.unsubscribe()}}class Qo extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"listener",(({options:t,activeIndex:e,slideLength:o})=>{const i=t.xoLoop&&"slide"===t.xoType?o-4*t.xoPerView:o,s=t.xoLoop&&"slide"===t.xoType?Math.min(e-2*t.xoPerView,i-t.xoPerView):e,n=Math.ceil(s/t.xoPerView);this.innerText=`${n+1}`}))}get providerElement(){return this.closest(zt.Carousel)}connectedCallback(){!this.providerElement||(this.unsubscribe=Po(this.providerElement.xoName,this.listener))}disconnectedCallback(){this.unsubscribe()}}let Zo=(d=class extends Mt{constructor(){super(...arguments),o(this,"carouselEl",null),o(this,"handleCarouselChange",(t=>{const{xoIndex:e}=this.props,{activeIndex:o}=t.detail;this.setProps({xoActive:e===o})})),o(this,"handleChange",(t=>{t.preventDefault(),ko(this.carouselEl.xoName,this.props.xoIndex,!0)}))}mount(){const{xoType:t,xoCarouselSelector:e}=this.props;this.carouselEl=document.querySelector(e),this.addEventListener("click"===t?"click":"mouseenter",this.handleChange),this.carouselEl&&this.carouselEl.addEventListener("xo:carousel:change",this.handleCarouselChange)}unmount(){var t;const{xoType:e}=this.props;this.removeEventListener("click"===e?"click":"mouseenter",this.handleChange),null==(t=this.carouselEl)||t.removeEventListener("xo:carousel:change",this.handleCarouselChange)}},o(d,"propTypes",{xoIndex:"number",xoType:"string",xoCarouselSelector:"string",xoActive:"boolean"}),o(d,"defaultProps",{xoIndex:0,xoType:"click",xoCarouselSelector:"xo-carousel",xoActive:!1}),d);Zo=Ye([$t(zt.CarouselTrigger)],Zo),se.create("xo-carousel",{initialState:{},useDeepEqual:!0}),window.xoCarousel=To;const Ko=To;F({[zt.Carousel]:qo,[zt.CarouselThumbnail]:Fo,[zt.CarouselSlide]:Bo,[zt.CarouselNext]:Wo,[zt.CarouselPrev]:Uo,[zt.CarouselList]:_o,[zt.CarouselPagination]:Xo,[zt.CarouselBullet]:Go,[zt.CarouselSize]:jo,[zt.CarouselPage]:Qo});const Jo=class extends HTMLElement{constructor(){super(),o(this,"inputEl1",null),o(this,"inputEl2",null),o(this,"trackEl",null),o(this,"thumbEl1",null),o(this,"thumbEl2",null),o(this,"progressEl",null),o(this,"priceEls",[]),o(this,"valueEls",[]),o(this,"initialized",!1),o(this,"resizeObserver",null),o(this,"prevWidth",0),o(this,"_value",[0,100]),o(this,"min",0),o(this,"max",100),o(this,"createChildComponent",(t=>document.createElement(t))),o(this,"createRange",(t=>{const{xoName:e,xoMin:o,xoMax:i,xoStep:s,xoValue:n}=this.options,r=document.createElement("input");return r.type="range",r.name=`${e}`,r.min=`${o}`,r.max=`${i}`,r.step=`${s}`,r.value=`${n[t]}`,r.addEventListener("input",this.handleInput),r.addEventListener("click",this.handleInput),r.addEventListener("mouseup",this.handleChangeEnd),r.addEventListener("touchend",this.handleChangeEnd),r})),o(this,"handleInput",(t=>{var e,o,i,s;const n=null!=(o=Number(null==(e=this.inputEl1)?void 0:e.value))?o:0,r=null!=(s=Number(null==(i=this.inputEl2)?void 0:i.value))?s:0;this.inputEl1&&t.target===this.inputEl1&&n>=r?this.inputEl1.value=`${r}`:this.inputEl2&&t.target===this.inputEl2&&r<=n?this.inputEl2.value=`${n}`:(this.setAttribute("xo-value",`[${n}, ${r}]`),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{value:[n,r]}})))})),o(this,"handler",(([t,e])=>{if(!(this.inputEl1&&this.inputEl2&&this.thumbEl1&&this.thumbEl2&&this.progressEl))return;const{xoMin:o,xoMax:i,xoName:s,xoComponentName:n}=this.options;this.inputEl1.setAttribute("value",`${t}`),this.inputEl1.value=`${t}`,this.inputEl2.setAttribute("value",`${e}`),this.inputEl2.value=`${e}`,this.inputEl1.setAttribute("name",`${s[0]}`),this.inputEl2.setAttribute("name",`${s[1]}`),q(this.priceEls,(o=>{var i,s,r;const a=null!=(r=null!=(s=null==(i=o.closest(zt.Filters))?void 0:i.getAttribute("xo-money-format"))?s:o.getAttribute("xo-money-format"))?r:"";o.getAttribute("xo-component-name")===n&&("min"===o.getAttribute("xo-type")?o.innerHTML=a.replace(/{.*}|(\d+(,|\.)?)+/g,`${t}`):"max"===o.getAttribute("xo-type")&&(o.innerHTML=a.replace(/{.*}|(\d+(,|\.)?)+/g,`${e}`)))})),q(this.valueEls,(o=>{o.getAttribute("xo-component-name")===n&&("min"===o.getAttribute("xo-type")?(o.setAttribute("value",`${t}`),o.value=`${t}`):"max"===o.getAttribute("xo-type")&&(o.setAttribute("value",`${e}`),o.value=`${e}`))}));const r=at({value:t,inputRange:[o,i],outputRange:[0,this.offsetWidth-this.thumbEl1.offsetWidth]}),a=at({value:e,inputRange:[o,i],outputRange:[0,this.offsetWidth-this.thumbEl2.offsetWidth]});this.thumbEl1.style.transform=`translateX(${r}px)`,this.thumbEl2.style.transform=`translateX(${a}px)`,this.progressEl.style.transform=`translateX(${r}px)`,this.progressEl.style.width=a-r+"px"})),o(this,"handleValueInput",(t=>{const e=t.currentTarget,o=Number(e.value);if(null!==o){if("min"===e.getAttribute("xo-type")){const t=e.value?Math.min(o,this.value[1]-10):0;this.value=[t,this.value[1]]}else if("max"===e.getAttribute("xo-type")){const t=e.value?Math.max(o,this.value[0]+10):0;this.value=[this.value[0],t]}this.handleChangeEnd()}})),o(this,"handleChangeEnd",(()=>{this.dispatchEvent(new CustomEvent("changed",{bubbles:!0,detail:{value:this.value}}))})),o(this,"setSize",(()=>{this.style.setProperty("--size",`${this.thumbEl1.offsetHeight}`)})),this.innerHTML=""}get options(){const t=nt(this,{pick:["xoComponentName","xoName","xoMin","xoMax","xoStep","xoValue"],types:{xoComponentName:"string",xoName:"array",xoMin:"number",xoMax:"number",xoStep:"number",xoValue:"array"}});return{...Jo.defaultOptions,...t}}get value(){return this._value}set value(t){this._value=t,this.setAttribute("xo-value",`[${t[0]}, ${t[1]}]`)}static get observedAttributes(){return["xo-value","xo-observed"]}async connectedCallback(){const{xoValue:t,xoMin:e,xoMax:o,xoComponentName:i}=this.options;this.innerHTML="",this.inputEl1=this.appendChild(this.createRange(0)),this.inputEl2=this.appendChild(this.createRange(1)),this.trackEl=this.appendChild(this.createChildComponent(zt.RangeTrack)),this.thumbEl1=this.appendChild(this.createChildComponent(zt.RangeThumb)),this.thumbEl2=this.appendChild(this.createChildComponent(zt.RangeThumb)),this.progressEl=this.trackEl.appendChild(this.createChildComponent(zt.RangeProgress)),await X(0),this.thumbEl1.setAttribute("xo-index","0"),this.thumbEl2.setAttribute("xo-index","1"),this.value=t,this.setSize(),this.min=e,this.max=o,this.priceEls=Array.from(document.querySelectorAll(`${zt.RangePrice}[xo-component-name=${i}]`)),this.valueEls=Array.from(document.querySelectorAll(`input[xo-component-name=${i}]`)),this.handler(this.value),q(this.valueEls,(t=>{t.getAttribute("xo-component-name")===i&&t.addEventListener("input",this.handleValueInput)})),this.resizeObserver=new ResizeObserver((t=>{for(let e of t){const t=e.contentRect.width;t!==this.prevWidth&&(this.setSize(),this.handler(this.value),this.prevWidth=t)}})),this.resizeObserver.observe(this)}attributeChangedCallback(t,e,o){if((null!=e&&null!=o||"xo-observed"===t)&&e!==o){const t=it(o);this.value=t,this.handler(t),this.initialized&&this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{value:t}})),this.initialized=!0}}disconnectedCallback(){var t;!this.inputEl1||!this.inputEl2||(this.inputEl1.removeEventListener("input",this.handleInput),this.inputEl2.removeEventListener("input",this.handleInput),this.inputEl1.removeEventListener("mouseup",this.handleChangeEnd),this.inputEl2.removeEventListener("mouseup",this.handleChangeEnd),this.inputEl1.removeEventListener("touchend",this.handleChangeEnd),this.inputEl2.removeEventListener("touchend",this.handleChangeEnd),this.inputEl1.removeEventListener("click",this.handleInput),this.inputEl2.removeEventListener("click",this.handleInput),q(this.valueEls,(t=>{t.removeEventListener("input",this.handleValueInput)})),null==(t=this.resizeObserver)||t.disconnect())}};let ti=Jo;function ei(){se.set("xo-filters",(t=>{const{formData:e}=t,o=Array.from(di(e)),i=K(Array.from(o),((t,[e,o])=>""===o||null==o?t:[...t,{name:e,value:o}]),[]);return{...t,refine:i}}))("xo-filters/setRefine")}function oi(t,e,o){se.set("xo-filters",(i=>{const{formData:s}=i;return s.set(t,e),o||s.delete("page"),{...i,formData:s}}))("xo-filters/updateFormDataItem")}function ii(t,e){const o=null!=e;se.set("xo-filters",(i=>{const{formData:s}=i;s.delete("page");const n=K(Array.from(di(s)),((i,[s,n])=>{if(o){if(s===t&&n===e)return i}else if(s===t)return i;return i.append(s,n),i}),new FormData);return{...i,formData:n}}))("xo-filters/removeFormDataItem")}function si(t,e){const o=null!=e;se.set("xo-filters",(i=>({...i,refine:R(i.refine,(i=>o?!(i.name===t&&i.value===e):i.name!==t))})))("xo-filters/removeRefineItem")}o(ti,"defaultOptions",{xoComponentName:"xo-range",xoName:["",""],xoMin:0,xoMax:100,xoStep:1,xoValue:[0,100]}),F({[zt.Range]:ti});const ni=new Map;async function ri(t){ni.size>10&&ni.delete(ni.keys().next().value);try{if(se.set("xo-filters",(t=>({...t,status:"request"})))("xo-filters/getHtml/request"),ni.has(t))await X(10),se.set("xo-filters",(e=>({...e,status:"success",html:ni.get(t),prevHtml:e.html})))("xo-filters/getHtml/success");else{const e=await(await fetch(t)).text();ni.set(t,e),se.set("xo-filters",(t=>({...t,status:"success",html:e,prevHtml:t.html})))("xo-filters/getHtml/success")}}catch{se.set("xo-filters",(t=>({...t,status:"failure"})))("xo-filters/getHtml/failure")}}function ai(){return se.get("xo-filters")}function li(t,e){return se.subscribe("xo-filters",t,e)}const ci={sort:"sort_by",page:"page",price:"['filter.v.price.gte', 'filter.v.price.lte']"};function hi(t,e){if(!t)return!1;const o=t.tagName.toLowerCase();return"input"===o?t.getAttribute("type")===e:o===e}function di(t){var e,o;if(!t.get("filter.v.price.gte"))return t;const i=null!=(e=Number(t.get("filter.v.price.gte")))?e:0,s=null!=(o=Number(t.get("filter.v.price.lte")))?o:0;return t.delete("filter.v.price.gte"),t.delete("filter.v.price.lte"),t.set(ci.price,`[${i}, ${s}]`),t}function ui(t){if(!t.get(ci.price))return t;const e=t.get(ci.price);t.delete(ci.price);const[o,i]=it(e);return t.set("filter.v.price.gte",String(o)),t.set("filter.v.price.lte",String(i)),t}async function pi(){const{formData:t,sectionId:e}=ai(),o=new URL(window.location.href.replace(window.location.search,""));o.search=vt(ui(t)),await ri(e?o.href.includes("?")?`${o.href}§ion_id=${e}`:`${o.href}?section_id=${e}`:o.href),o.href!==window.location.href&&window.history.pushState(null,"",o.href)}const mi=W()` ${zt.StickyInner} { position: relative; } ${zt.StickyInner}[xo-is-sticky] { position: fixed; left: 0; right: 0; z-index: 1000; transition: all 0.3s; backface-visibility: hidden; } ${zt.StickyInner}[xo-lock] { transform: translateY(0) !important; } ${zt.StickyContent} { display: block; } `;function xi(t){const e=se.get("xo-sticky");return"top"===t?e.topNodes:e.bottomNodes}function gi(t){return"top"===t?"topNodes":"bottomNodes"}function vi(t,e,o){se.set("xo-sticky",(i=>{const s=xi(o);return{...i,[gi(o)]:Z(s,(o=>o.element===t?{...o,isSticky:e}:o))}}))}function bi(t,e,o){se.set("xo-sticky",(i=>{const s=xi(o);return{...i,[gi(o)]:Z(s,(o=>o.element===t?{...o,directionDownHide:e}:o))}}))}const fi=new Map;function yi(t,e){var o;const i=xi(e),s=Q(i,(e=>e.element===t)),n=K(R(i,((t,e)=>et+e.height),0);return fi.set(t,n),null!=(o=fi.get(t))?o:0}function Ei(t,e){const o=xi(e),i=Q(o,(e=>e.element===t));return K(o,((t,e,o)=>oe.directionDownHide?t:e.isSticky?t+e.height:t),0)}function Si(t,e){return se.subscribe("xo-sticky",t,e)}const Ci=class extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"frameId",-1),o(this,"shadow",null),o(this,"innerEl"),o(this,"contentEl"),o(this,"prevScrollY",window.scrollY),o(this,"_options"),o(this,"setOptions",(()=>{this.options=nt(this,{pick:["xoDirection","xoPlacement","xoDisabled"],types:{xoDirection:"string",xoPlacement:"string",xoDisabled:"boolean"}})})),o(this,"addSticky",(()=>{const{xoPlacement:t}=this.options,e=yi(this.contentEl,t);$(this.innerEl,"xo-is-sticky",!0),"top"===t?this.innerEl.style.top=`${e}px`:this.innerEl.style.bottom=`${e}px`})),o(this,"removeStick",(()=>{const{xoPlacement:t}=this.options;$(this.innerEl,"xo-is-sticky",!1),"top"===t?this.innerEl.style.removeProperty("top"):this.innerEl.style.removeProperty("bottom")})),o(this,"handleStickyTop",(()=>{const{xoDirection:t}=this.options,e=yi(this.contentEl,"top"),o=Ei(this.contentEl,"top"),{top:i}=this.getBoundingClientRect(),s=window.scrollY=e&&(this.removeStick(),vi(this.contentEl,!1,"top"),bi(this.contentEl,!0,"top"),$(this,"xo-is-sticky",!1)),this.innerEl.style.transform="translateY(0px)"):(i=e&&(this.removeStick(),vi(this.contentEl,!1,"top"),$(this,"xo-is-sticky",!1)),this.innerEl.style.transform=s?"translateY(0px)":`translateY(-${o}px)`)})),o(this,"handleStickyBottom",(()=>{const{xoDirection:t}=this.options,e=yi(this.contentEl,"bottom"),o=Ei(this.contentEl,"bottom"),{top:i}=this.getBoundingClientRect(),s=window.scrollY=e+n&&(vi(this.contentEl,!1,"bottom"),bi(this.contentEl,!0,"bottom"),this.innerEl.style.transform=`translateY(${n+e}px)`,$(this,"xo-is-sticky",!1)),s||(this.innerEl.style.transform=`translateY(${n+e}px)`,bi(this.contentEl,!0,"bottom"))):(r=e&&(this.removeStick(),vi(this.contentEl,!1,"bottom"),$(this,"xo-is-sticky",!1)),this.innerEl.style.transform=s?"translateY(0px)":`translateY(${o}px)`)})),o(this,"handler",(()=>{this.frameId=requestAnimationFrame((()=>{const{xoPlacement:t}=this.options,e=this.contentEl.offsetHeight;this.contentEl.style.height=`${e}px`,this.innerEl.style.height=`${e}px`,"top"===t?this.handleStickyTop():this.handleStickyBottom(),this.prevScrollY=window.scrollY}))})),o(this,"render",(()=>{const{cssText:t}=mi;return`\n \n <${zt.StickyInner}>\n <${zt.StickyContent}>\n \n `})),o(this,"init",(async()=>{const{xoDirection:t,xoPlacement:e}=this.options;this.shadow=this.shadow||this.attachShadow({mode:"open"}),this.shadow.innerHTML||(this.shadow.innerHTML=this.render()),this.innerEl=this.shadow.querySelector(zt.StickyInner),this.contentEl=this.shadow.querySelector(zt.StickyContent),await X(100),function(t,e,o){se.set("xo-sticky",(i=>{const s=xi(o),n=s.find((e=>e.element===t)),r={element:t,height:t.offsetHeight,isSticky:!1,direction:e,directionDownHide:!1},a=n?s:"top"===o?[...s,r]:[r,...s];return{...i,[gi(o)]:a}}))}(this.contentEl,t,e),"top"===e&&(this.style.height=`${this.contentEl.offsetHeight}px`),this.handler(),window.addEventListener("scroll",this.handler),window.addEventListener("resize",this.handler)}))}get options(){return{...Ci.defaultOptions,...this._options}}set options(t){this._options=t}static get observedAttributes(){return["xo-observed","xo-direction","xo-placement"]}connectedCallback(){this.setOptions();const{xoDisabled:t}=this.options;t||(this.init(),this.unsubscribe=se.subscribe("xo-popover",(t=>{const e=ht(t.data).find((t=>t.isOpen)),o=!(null==e||!e.isOpen),i=null==e?void 0:e.triggerElement;(null==i?void 0:i.closest(zt.Sticky))?$(this.innerEl,"xo-lock",o&&!!this.innerEl):$(this.innerEl,"xo-lock",!1)})))}disconnectedCallback(){const{xoPlacement:t}=this.options;this.innerEl&&(this.innerEl.style.removeProperty("height"),this.innerEl.style.removeProperty("transform"),this.innerEl.style.removeProperty("top"),this.innerEl.style.removeProperty("bottom")),this.contentEl&&this.contentEl.style.removeProperty("height"),this.style.removeProperty("height"),$(this,"xo-is-sticky",!1),this.innerEl&&$(this.innerEl,"xo-is-sticky",!1),window.removeEventListener("scroll",this.handler),window.removeEventListener("resize",this.handler),cancelAnimationFrame(this.frameId),this.contentEl&&function(t,e){se.set("xo-sticky",(o=>{const i=R(xi(e),(e=>e.element!==t));return{...o,[gi(e)]:i}}))}(this.contentEl,t),this.unsubscribe()}async attributeChangedCallback(t,e,o){e!==o&&(this.disconnectedCallback(),await X(100),this.connectedCallback())}};let ki=Ci;o(ki,"defaultOptions",{xoDirection:"up",xoPlacement:"top",xoDisabled:!1});const Ai=class extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",null),o(this,"prevStickyHeight",0)}get options(){const t=nt(this,{pick:["xoPlacement"],types:{xoPlacement:"string"}});return{...Ai.defaultOptions,...t}}connectedCallback(){const{xoPlacement:t}=this.options;this.unsubscribe=Si((()=>{const e=wi(t);this.prevStickyHeight!==e&&(this.style.height=`${e}px`,this.prevStickyHeight=e)}))}disconnectedCallback(){var t;null==(t=this.unsubscribe)||t.call(this)}};let Pi=Ai;o(Pi,"defaultOptions",{xoPlacement:"top"}),se.create("xo-sticky",{initialState:{topNodes:[],bottomNodes:[]}});const Ti={subscribe:Si,getStickyHeight:wi,getNodes:xi};window.xoSticky=Ti,F({[zt.Sticky]:ki,[zt.StickySpace]:Pi});const Mi=class extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"unsubscribe2",(()=>{})),o(this,"timeId",-1),o(this,"_options"),o(this,"setOptions",(()=>{this.options=nt(this,{pick:["xoScrollTop","xoSectionId"],types:{xoScrollTop:"boolean",xoSectionId:"string"}})})),o(this,"getStickyHeight",(()=>K(Ti.getNodes("top"),((t,e)=>t+e.height),0))),o(this,"listener",(async()=>{const{xoScrollTop:t}=this.options;if(await X(100),t){const t=document.querySelector(zt.FiltersTop);t?window.scrollY>dt(t).top&&window.scrollTo({top:dt(t).top-this.getStickyHeight(),behavior:"smooth"}):window.scrollTo({top:0,behavior:"smooth"})}})),o(this,"listener2",(()=>{const{status:t}=ai();"request"===t?$(this,"xo-loading",!0):"success"===t&&$(this,"xo-loading",!1)})),o(this,"handlePopState",(async t=>{t.preventDefault();const{search:e}=window.location,o=gt(e),i=new FormData;q(o,(([t,e])=>{i.append(t,e)})),function(t){const e=t instanceof FormData?t:new FormData(t);se.set("xo-filters",(t=>(Number(e.get("filter.v.price.gte"))===t.priceMin&&Number(e.get("filter.v.price.lte"))===t.priceMax&&(e.delete("filter.v.price.gte"),e.delete("filter.v.price.lte")),{...t,formData:di(e)})))("xo-filters/setFormData")}(i),await ri(window.location.href),ei()})),o(this,"setDefaultFieldsFromParams",(()=>{const{search:t}=window.location,e=gt(t),o=new FormData;q(e,(([t,e])=>{o.append(t,e)}));const i=di(o);q(gt(i),(([t,e])=>{q(Array.from(this.querySelectorAll(`${zt.FiltersField} [name="${t}"], ${zt.FiltersField} xo-range[xo-name="${ci.price}"]`)),(o=>{if(o)if((hi(o,"checkbox")||hi(o,"radio"))&&t===o.getAttribute("name")){const o=this.querySelector(`[name='${t}'][value='${e}']`);o.checked=!0,hi(o,"radio")&&q(Array.from(this.querySelectorAll(zt.FiltersSortBySelected)),(t=>{var i;o.name===ci.sort&&(t.textContent=null!=(i=o.getAttribute("xo-label"))?i:e)}))}else if(hi(o,"xo-range")&&t===o.getAttribute("xo-name")){const[t,i]=it(e);o.setAttribute("xo-value",`[${t}, ${i}]`),o.value=[t,i]}else o instanceof HTMLSelectElement&&(o.value=e)}))}))}))}get options(){return{...Mi.defaultOptions,...this._options}}set options(t){this._options=t}static get observedAttributes(){return["xo-observed"]}async connectedCallback(){this.setOptions(),this.timeId=window.setTimeout((()=>{(function(){const t=new URL(window.location.href),e=gt(t.search),o=new FormData;q(e,(([t,e])=>{o.append(t,e)})),se.set("xo-filters",(t=>(Number(o.get("filter.v.price.gte"))===t.priceMin&&Number(o.get("filter.v.price.lte"))===t.priceMax&&(o.delete("filter.v.price.gte"),o.delete("filter.v.price.lte")),{...t,formData:di(o)})))("xo-filters/setDefaultFormData")})(),this.setDefaultFieldsFromParams(),ei(),function(){const{formData:t}=ai(),e=new URL(window.location.href.replace(window.location.search,""));e.search=vt(ui(t)),e.href!==window.location.href&&window.history.pushState(null,"",e.href)}(),function(t){se.set("xo-filters",(e=>({...e,sectionId:t})))("xo-filters/setSectionId")}(this.options.xoSectionId),clearTimeout(this.timeId)}),50),window.addEventListener("popstate",this.handlePopState),this.unsubscribe=li(this.listener,((t,e)=>!(null!=t&&(null==t?void 0:t.html)!==(null==e?void 0:e.html)&&null!=t||null!=t&&!j(null==t?void 0:t.refine,null==e?void 0:e.refine)))),this.unsubscribe2=li(this.listener2,((t,e)=>(null==t?void 0:t.status)===(null==e?void 0:e.status)))}attributeChangedCallback(t,e,o){"xo-observed"===t&&e!==o&&this.setOptions()}disconnectedCallback(){this.unsubscribe(),this.unsubscribe2(),window.removeEventListener("popstate",this.handlePopState),clearTimeout(this.timeId)}};let $i=Mi;o($i,"defaultOptions",{xoScrollTop:!0,xoSectionId:""});class Li extends HTMLElement{constructor(){super(...arguments),o(this,"handleInput",(async t=>{var e,o;const i=t.target;if(i instanceof HTMLInputElement&&"range"!==i.type)if(hi(i,"checkbox"))i.checked?function(t,e){se.set("xo-filters",(o=>{const{formData:i}=o;return i.append(t,e),{...o,formData:i}}))("xo-filters/pushFormDataItem")}(i.name,i.value):ii(i.name,i.value);else{const t=document.querySelector(zt.Filters);if(t&&hi(i,"radio")){const e=i.closest(zt.Popover),o=null==e?void 0:e.getAttribute("xo-name"),s=document.querySelector(`${zt.PopoverTrigger}[xo-name="${o}"]`);q(Array.from((null!=s?s:t).querySelectorAll(zt.FiltersSortBySelected)),(t=>{var e;i.name===ci.sort&&(t.textContent=null!=(e=i.getAttribute("xo-label"))?e:i.value)})),i.name===ci.sort&&e&&o&&Ve.close(o)}oi(i.name,i.value)}else if(i instanceof HTMLSelectElement)oi(i.name,i.value);else if(hi(i,"xo-range")){const[t,s]=i.value,n=null!=(e=Number(i.getAttribute("xo-min")))?e:0,r=null!=(o=Number(i.getAttribute("xo-max")))?o:0;t===n&&s===r?ii(ci.price):oi(ci.price,`[${t}, ${s}]`)}const s=gt(window.location.search,!0);s.page&&oi("page",s.page),pi(),ei()})),o(this,"handleRange",U(this.handleInput)),o(this,"handler",(t=>{var e,o;!t||(hi(t,"xo-range")?(function(t,e){se.set("xo-filters",(o=>({...o,priceMin:t,priceMax:e})))("xo-filters/setPriceMinMax")}(null!=(e=Number(t.getAttribute("xo-min")))?e:0,null!=(o=Number(t.getAttribute("xo-max")))?o:0),t.addEventListener("changed",this.handleRange)):t.addEventListener("change",this.handleInput))}))}connectedCallback(){!function(t){if(1!==t.children.length&&!/input|select|xo-range/g.test(t.children[0].tagName.toLowerCase()))throw new Error(`${zt.FiltersField}: field must have one child and it must be an input, select or ${zt.Range}`)}(this),q(Array.from(this.querySelectorAll("input, select, xo-range")),this.handler)}disconnectedCallback(){q(Array.from(this.querySelectorAll("input, select, xo-range")),(t=>{hi(t,"xo-range")?t.removeEventListener("change",this.handleRange):t.removeEventListener("change",this.handleInput)}))}}const Ii=class extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"listener",(()=>{const{refine:t,priceMin:e,priceMax:o}=ai(),{xoName:i,xoClearAll:s}=this.options;if(s){const e=!!R(t,(t=>/filter./g.test(t.name))).length;$(this,"xo-visible",e)}else $(this,"xo-visible",!1);q(t,(t=>{if(t.name.includes("filter.v.price.")||t.name!==i){if(t.name.includes("filter.v.price.")&&i.includes("filter.v.price.")){const[i,s]=it(t.value);(i!==e||s!==o)&&$(this,"xo-visible",!0)}}else $(this,"xo-visible",!0)}))})),o(this,"resetFields",(()=>{const{xoName:t,xoValue:e,xoClearAll:o}=this.options;let i=Array.from(document.querySelectorAll(`${zt.FiltersField} input[type="radio"][name="${t}"]${e?`[value="${e}"]`:""}, ${zt.FiltersField} input[type="checkbox"][name="${t}"]${e?`[value="${e}"]`:""}, ${zt.FiltersField} xo-range[xo-name="${t}"], ${zt.FiltersField} select[name="${t}"]`));o&&(i=Array.from(document.querySelectorAll(`${zt.FiltersField} input[type="radio"], ${zt.FiltersField} input[type="checkbox"], ${zt.FiltersField} xo-range, ${zt.FiltersField} select`))),q(i,(t=>{if(t&&hi(t,"checkbox")||hi(t,"radio"))t.removeAttribute("checked"),t.checked=!1;else if(hi(t,"xo-range"))t.value=[t.min,t.max];else if(hi(t,"select")){const e=t.querySelector("option");t.value=(null==e?void 0:e.value)||""}}))})),o(this,"handleClick",(async()=>{const{xoName:t,xoValue:e,xoClearAll:o}=this.options;o?se.set("xo-filters",(t=>{const{formData:e}=t,o=e.get("q"),i=new FormData;return o&&i.append("q",o),{...t,refine:[],formData:i}}))("xo-filters/removeAllRefineAndFormData"):(si(t,e),ii(t,e),t.includes("filter.v.price.")&&(si(ci.price),ii(ci.price))),await pi(),this.resetFields()}))}get options(){const t=nt(this,{pick:["xoName","xoValue","xoClearAll"],types:{xoName:"string",xoValue:"string",xoClearAll:"boolean"}});return{...Ii.defaultOptions,...t}}connectedCallback(){this.addEventListener("click",this.handleClick),this.unsubscribe=li(this.listener)}disconnectedCallback(){this.unsubscribe(),this.removeEventListener("click",this.handleClick)}};let Oi=Ii;o(Oi,"defaultOptions",{xoName:"",xoClearAll:!1});class Ni extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"childEls",[]),o(this,"setEmpty",(()=>{const{refine:t}=ai(),e=!R(t,(t=>/filter./g.test(t.name))).length;$(this,"xo-empty",e)})),o(this,"render",(()=>{var t,e;const o=null!=(e=null==(t=this.closest(zt.Filters))?void 0:t.getAttribute("xo-money-format"))?e:"",{refine:i}=ai();return Z(i,(t=>{var e,i,s;if(!/filter./g.test(t.name))return"";const n=document.querySelector(`${zt.FiltersField} input[type="radio"][name="${t.name}"][value="${t.value}"], ${zt.FiltersField} input[type="checkbox"][name="${t.name}"][value="${t.value}"], ${zt.FiltersField} xo-range[xo-name="${t.name}"]`),r=t.name.includes("filter.v.price.")?Z(it(t.value),(t=>o.replace(/{.*}|(\d+(,|\.)?)+/g,`${t}`))).join(" - "):null!=(e=null==n?void 0:n.getAttribute("xo-label"))?e:"",a=null!=(s=null==(i=this.querySelector(zt.FiltersRefineClearIcon))?void 0:i.innerHTML)?s:"×";return`\n <${zt.FiltersClear} xo-name="${t.name}" xo-value="${t.value}">\n ${r} ${a}\n \n `}))})),o(this,"listener",(()=>{this.setEmpty(),this.innerHTML=this.render().join(""),q(this.childEls,(t=>{this.appendChild(t)}))}))}connectedCallback(){0===this.childEls.length&&(this.childEls=Array.from(this.childNodes)),this.setEmpty(),this.unsubscribe=li(this.listener)}disconnectedCallback(){var t;null==(t=this.unsubscribe)||t.call(this)}}const Di=new V;class qi extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"callback",null),o(this,"handleContent",(t=>{this.callback=t})),o(this,"listener",(()=>{const{html:t,prevHtml:e,status:o}=ai();if("success"===o&&t!==e){const e=(new DOMParser).parseFromString(t,"text/html").querySelector(zt.FiltersContent);if(e){const t=e.cloneNode(!0);q(Array.from(t.querySelectorAll(zt.Animate)),(t=>{$(t,"xo-disabled",!0)})),this.callback?this.innerHTML=this.callback(t.innerHTML):this.innerHTML=t.innerHTML,Di.emit("done",void 0),se.set("xo-filters",(t=>({...t,status:"idle"})))("xo-filters/resetStatus")}}}))}connectedCallback(){this.unsubscribe=li(this.listener)}disconnectedCallback(){this.unsubscribe()}}class Hi extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"listener",(()=>{const{status:t}=ai();"request"===t?$(this,"xo-visible",!0):"success"===t&&$(this,"xo-visible",!1)}))}connectedCallback(){this.unsubscribe=li(this.listener,((t,e)=>t.status===e.status))}disconnectedCallback(){this.unsubscribe()}}const Fi=class extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"queueId",-1),o(this,"listener",(()=>{(function(t){"requestIdleCallback"in window?cancelIdleCallback(t):clearTimeout(t)})(this.queueId),this.queueId=function(t){let e=-1;return e="requestIdleCallback"in window?requestIdleCallback((()=>{t(),cancelIdleCallback(e)})):setTimeout((()=>{t(),clearTimeout(e)}),0),e}((()=>{var t;const{xoUniqueId:e}=this.options,{html:o}=ai(),i=(new DOMParser).parseFromString(o,"text/html").querySelector(`${zt.FiltersCount}[xo-unique-id="${e}"]`);if(i&&i.textContent&&this.textContent!==i.textContent){const e=null!=(t=Number(i.textContent.trim().replace(/\D*/g,"")))?t:0;this.textContent=i.textContent;const o=this.closest(zt.FiltersField);o&&$(o,"xo-disabled",0===e)}}))}))}get options(){const t=nt(this,{pick:["xoUniqueId"],types:{xoUniqueId:"string"}});return{...Fi.defaultOptions,...t}}connectedCallback(){const{xoUniqueId:t}=this.options,e=this.closest(zt.FiltersField);if(!t)throw new Error(`${zt.FiltersCount}: Attribute xo-unique-id is required (Note: xo-unique-id is unique)`);if(!e)throw new Error(`${zt.FiltersCount} must be inside ${zt.FiltersField}`);this.unsubscribe=li(this.listener)}disconnectedCallback(){this.unsubscribe()}};let Ri=Fi;o(Ri,"defaultOptions",{xoUniqueId:""});const Vi=class extends HTMLElement{constructor(){super(...arguments),o(this,"unsubscribe",(()=>{})),o(this,"listener",(()=>{const{xoUniqueId:t}=this.options,{html:e}=ai(),o=(new DOMParser).parseFromString(e,"text/html").querySelector(`${zt.FiltersActiveSize}[xo-unique-id="${t}"]`);o&&o.textContent&&(this.textContent=o.textContent)}))}get options(){const t=nt(this,{pick:["xoUniqueId"],types:{xoUniqueId:"string"}});return{...Vi.defaultOptions,...t}}connectedCallback(){const{xoUniqueId:t}=this.options;if(!t)throw new Error(`${zt.FiltersActiveSize}: Attribute xo-unique-id is required (Note: xo-unique-id is unique)`);this.unsubscribe=li(this.listener)}disconnectedCallback(){this.unsubscribe()}};let zi=Vi;o(zi,"defaultOptions",{xoUniqueId:""});class _i extends HTMLElement{constructor(){super(),o(this,"unsubscribe",(()=>{})),o(this,"anchorEls"),o(this,"observer"),o(this,"handleClick",(t=>{t.preventDefault();const e=new URL(t.currentTarget.href);oi("page",gt(e.search,!0).page,!0),pi(),ei()})),o(this,"listener",(()=>{const{html:t}=ai(),e=(new DOMParser).parseFromString(t,"text/html").querySelector(zt.FiltersPaginate);e&&e.innerHTML&&(this.innerHTML=e.innerHTML)})),this.anchorEls=Array.from(this.querySelectorAll("a")),this.observer=new MutationObserver((()=>{this.anchorEls=Array.from(this.querySelectorAll("a")),q(this.anchorEls,(t=>{t.removeEventListener("click",this.handleClick),t.addEventListener("click",this.handleClick)}))})),this.observer.observe(this,{childList:!0})}connectedCallback(){this.unsubscribe=li(this.listener),q(this.anchorEls,(t=>{t.removeEventListener("click",this.handleClick),t.addEventListener("click",this.handleClick)}))}disconnectedCallback(){this.unsubscribe(),this.observer.disconnect(),q(this.anchorEls,(t=>{t.removeEventListener("click",this.handleClick)}))}}(function(){let t=0;const e=()=>{var t;const e="::disabled",o=document.querySelector(zt.Filters),i=document.querySelector(zt.FiltersMobile);if(o&&i){const s=Array.from(i.querySelectorAll(`${zt.FiltersField} input[type="radio"]`)),n=Array.from(o.querySelectorAll(`${zt.FiltersField} input[type="radio"]`)).filter((t=>!t.closest(zt.FiltersMobile))),r=null!=(t=nt(i,{pick:["xoMobileMaxWidth"],types:{xoMobileMaxWidth:"number"}}).xoMobileMaxWidth)?t:767;window.innerWidth<=r||ct?(q(s,(t=>{const o=t.getAttribute("name");o&&(t.hasAttribute("checked")&&(t.checked=!0),t.setAttribute("name",o.replace(e,"")))})),q(n,(t=>{const o=t.getAttribute("name");o&&!o.includes(e)&&(t.checked=!1,t.setAttribute("name",o+e))}))):(q(n,(t=>{const o=t.getAttribute("name");o&&(t.hasAttribute("checked")&&(t.checked=!0),t.setAttribute("name",o.replace(e,"")))})),q(s,(t=>{const o=t.getAttribute("name");o&&!o.includes(e)&&(t.checked=!1,t.setAttribute("name",o+e))})))}},o=U((o=>{for(let i of o){const o=i.contentRect.width;o!==t&&(e(),t=o)}}),300);e(),new ResizeObserver(o).observe(document.body)})(),se.create("xo-filters",{initialState:{fieldInfo:{},formData:new FormData,refine:[],status:"idle",html:"",prevHtml:"",priceMax:0,priceMin:0,sectionId:""}}),window.xoFilters=Di,F({[zt.Filters]:$i,[zt.FiltersField]:Li,[zt.FiltersClear]:Oi,[zt.FiltersRefine]:Ni,[zt.FiltersContent]:qi,[zt.FiltersFallback]:Hi,[zt.FiltersCount]:Ri,[zt.FiltersActiveSize]:zi,[zt.FiltersPaginate]:_i});const Bi='\n \n';let Wi=0;const Ui=class extends HTMLElement{constructor(){super(),o(this,"itemEls",[]),o(this,"portalEl",null),o(this,"portalContent"),o(this,"_options"),o(this,"setOptions",(()=>{this.options={...nt(this,{pick:["xoAnimate","xoDuration","xoEasing","xoBackdropColor","xoSync","xoPortalClass"],types:{xoAnimate:"string",xoDuration:"number",xoEasing:"string",xoBackdropColor:"string",xoSync:"boolean",xoPortalClass:"string"}})}})),o(this,"renderPortal",((t,e)=>{const{xoAnimate:o,xoDuration:i,xoEasing:s,xoBackdropColor:n}=this.options;t.setAttribute("xo-name",`${Wi}`),t.setAttribute("xo-index",`${e}`);const r=t.getAttribute("xo-intrinsic-width"),a=t.getAttribute("xo-src"),l=/\.(mp4|webm|ogg)$/i.test(a),c=r?rt(a,{width:r}):a,h=l?`